Αρχική ΑΕΠΠ - Δομές Δεδομένων Λειτουργικά Συστήματα Δίκτυα Υπολογιστών ΙΙ Βάσεις Δεδομένων Παιδαγωγικά - Διδακτική

Για τους συγγραφείς

Basic Editing Documentation Index WikiSandbox SourceBlock

Για όλους

PmWiki FAQ PmWikiPhilosophy

 Ιστορικό Πρόσφατες αλλαγές Εκτύπωση Αναζήτηση
@echo off
set /p source_folder= Enter source folder with images (full path, no trailing slash):
set /p destination_folder= Enter destination folder to move images (full path, no trailing slash):
set /p source_format=Enter source image format (e.g. tif):
set /p destination_format=Enter destination image format (e.g. jpg):

echo You have set folder to: %folder%
echo

if exist %source_folder% do (
        echo Starting change format process...
        for /R %source_folder% %%j in (*.%source_format%) do (
                echo Changing format of file: %%j ...
                mogrify -format %destination_format% %%j
        )

        echo
        echo Change format process finished!
        echo Starting resizing process...

        for /R %source_folder% %%j in (*.%destination_format%) do (
                echo Resizing file: %%j ...
                mogrify -resize 800x600 %%j
        )

        echo
        echo Resizing process finished!
        echo Moving new files to destination folder

        echo Determining windows version...
        ver > ver.tmp
        Rem Is it Vista?
        find /i "6." "ver.tmp"
        if %ERRORLEVEL% EQU 0 do (
                echo It's Vista...
                robocopy %source_folder% %destination_folder% *.%destination_format% /s /MOV
        ) else (
                rem It's older
                echo It's not Vista...
                echo xcopy started...
                xcopy %source_folder% %destination_folder% /d /s
                echo
                echo Doing the cleanup (removing copied files)...
                for /R %source_folder% %%j in (*.%destination_format%) do (
                        echo Removing file: %%j ...
                        del %%j
                )
        )
        del ver.tmp
)

Τελευταία ενημέρωση: 06-04-2009 (19:32)

Copyright 2008 - Άρης Φεργάδης