+ Post New Thread
Results 1 to 5 of 5
Scripts Thread, Image Convertor Plus - Image Backup & Reduce Batch File in Coding and Web Development; This script is something I put together for use with Robocopy and Image Converter plus which you can purchase for ...
  1. #1
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,791
    Thank Post
    303
    Thanked 327 Times in 233 Posts
    Rep Power
    119

    Image Convertor Plus - Image Backup & Reduce Batch File

    This script is something I put together for use with Robocopy and Image Converter plus which you can purchase for 50% off (Allow 2 days for a reply but fill out support form asking for education discount link and then will send discount purchase link).

    JPG-Backup-Reduce-ver2.bat - This is the one you run
    Code:
    ECHO OFF
    
    ECHO Backup Jpeg images to the backup location 
    robocopy "F:\Files\Source" "F:\Backups\Target" /S /SEC /COPYALL /V /NP /LOG:"F:\Backups\Robocopy-log.txt" /Z /R:10 /W:30 *.jpg 
    
    REM Change directory to the source
    cd F:\Files\Source
    
    ECHO Start condensing images to 1600x1200 & 75% quality
    for /R %%d in (.) do \\server\scripts\maintenance\images\ImgResize-1600x1200JpgOver.bat "%%d\*.jpg"


    ImgResize-1600x1200JpgOver.bat - Store me in "\\server\scripts\maintenance\images\"
    Code:
    "C:\Program Files\ImageConverter Plus\ICPCL.exe" -convertto jpg quality:75 -save_opt convert_subfolders:yes restore_subfolders:yes log:no -source %1 -dest "{Source path}" -target_opt if_exists:auto_overwrite  -oper Resize size:1600 1200 nozoom:yes keep_prop:yes units:pixels

    What It Does:
    The system uses Robocopy to do a backup of all the original JPG images to an archive folder somewhere so you always have a fallback position and then compresses the original images in-situ using a command line version of IC+ to a more manageable size of 1600x100 @ 75%


    Notes:
    For some reason the Image Convertor (IC+) utility has a small bug in that it won't traverse sub-directories if you specify the file extension so I had to hack it around to use the FOR dos command to do it manually... Slows things down a bit but it does work so can't complain.

    If you want to just get ANY image files (including PDF's) you can just change the wildcard in this line:
    Code:
    for /R %%d in (.) do \\server\scripts\maintenance\images\ImgResize-1600x1200JpgOver.bat "%%d\*.jpg"
    to:
    Code:
    for /R %%d in (.) do \\server\scripts\maintenance\images\ImgResize-1600x1200JpgOver.bat "%%d\*.*"

    I've got this script running now on a partition used for staff files and it's currently crunching the size of the disk down by around 50% which is very welcome and long overdue...

    Frankly the cost of the utility and the hours spent figuring the batch file out was well worth it... Compared to the alternative of trying to re-educate the staff in less than a year

  2. Thanks to contink from:

    flyinghaggis (13th July 2010)

  3. #2
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,791
    Thank Post
    303
    Thanked 327 Times in 233 Posts
    Rep Power
    119
    Quick note to stop anyone else coming a cropper... You need the Image Converter Plus Command line edition and not the general version.

    Whoever wrote their sites and documentation needs to be shot as it's not obvious that there's two versions and they seem to ignore each other but basically be warned there's a non-cmd line version which won't work with my script.

  4. #3

    Join Date
    Dec 2007
    Posts
    890
    Thank Post
    94
    Thanked 165 Times in 140 Posts
    Rep Power
    50
    I use IrfanView - Official Homepage - one of the most popular viewers worldwide that has a batch resize / modify routine and is a free alternative.

  5. #4
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,791
    Thank Post
    303
    Thanked 327 Times in 233 Posts
    Rep Power
    119
    Quote Originally Posted by MYK-IT View Post
    I use IrfanView - Official Homepage - one of the most popular viewers worldwide that has a batch resize / modify routine and is a free alternative.
    Yeah but is it command line and can it be run as a scheduled task?

    It's great if you can spare the time to sort through but this thing just goes, searches and gets on with it... Just sooo much easier for me.

  6. #5
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,791
    Thank Post
    303
    Thanked 327 Times in 233 Posts
    Rep Power
    119
    Minor update to allow for remote manipulation of a target folder

    JPG-Backup-Reduce-ver3.bat - This is the one you run
    Code:
    ECHO OFF
    
    ECHO Map B: Drive letter to the target folder
    net use B: "F:\Files\Source"
    
    ECHO Backup Jpeg images to the backup location 
    robocopy "B:" "F:\Backups\Target" /S /SEC /COPYALL /V /NP /LOG:"F:\Backups\Robocopy-log.txt" /Z /R:10 /W:30 *.jpg 
    
    REM Change drive/directory to the source
    B:
    
    ECHO Start condensing images to 1600x1200 & 75% quality
    for /R %%d in (.) do \\server\scripts\maintenance\images\ImgResize-1600x1200JpgOver.bat "%%d\*.jpg"
    
    REM Change to other drive and remove drive mapping
    c:
    net use b: /DELETE /YES



SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 6
    Last Post: 16th July 2009, 02:52 PM
  2. How to create an Image backup?
    By lionsl2005 in forum How do you do....it?
    Replies: 0
    Last Post: 1st June 2009, 07:55 PM
  3. batch tool to reduce jpg sizes?
    By reggiep in forum Windows
    Replies: 12
    Last Post: 16th May 2008, 12:21 AM
  4. Replies: 5
    Last Post: 14th January 2008, 12:39 AM
  5. Batch image convert...
    By indie in forum Windows
    Replies: 17
    Last Post: 12th December 2006, 01:19 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •