|

| |
@ECHO OFF
REM based on pcMagazine and alt.msdos.batch.net; Heavily modified by Mark
Benavides, DDS 9/9/2001
REM Delete option added November 2001
REM Name addiiton added January 2004
REM THIS BATCH FILE assumes media card is G DRIVE, and you wish to save to P
DRIVE (Photos)
REM '<CTRL> WILL ALLOW YOU TO EDIT | REPLACE FOR G DRIVE (I:\) AND DESTINATION
(P:\)
REM JANUARY 2005: ADD names to PHOTO subdirectory
ECHO Enter LastFirst or Suffix Text for Directory Name:
Set /p input=
for /F "tokens=1-4 delims=/ " %%i in ('date /t') do (
set DayOfWeek=%%i
set Month=%%j
set Day=%%k
set Year=%%l
set Date=%%i %%j/%%k/%%l
)
for /F "tokens=1-2 delims=: " %%m in ('time /t') do (
set Hour=%%m
set Min=%%n
set Time=%%m %%n
)
REM ECHO Time is "%Time%"
REM Echo Hours is "%Hour%", Minutes are "%Min%"
REM ECHO Date is %Date%
REM ECHO Day of Week is "%DayOfWeek%", Month is "%Month%"
REM ECHO Day is "%Day%", Year is "%Year%"
REM EDIT THE LINE BELOW TO REFLECT YOUR HARDDDRIVE SAVE LOCATION
REM The following creates a directory for future file movement
mkdir E:\_PHOTOS\_PATIENTS\"%input%"\
type nul > E:\A_Backup.txt
for %%a in (jpg crw avi thm tif mrw wav mov mp3 mpg cr2 raf nef raw) do (
for /f "tokens=*" %%b in ('dir /s /b I:\*.%%a') do (
xcopy "%%b" E:\"%Year%"-"%Month%"-"%Day%"_"%input%"\
)
)
REM EDIT TWO LINES ABOVE (THE 'I:\') TO REFLECT THE DRIVE LETTER OF YOUR
REMOVABLE MEDIA
REM EDIT THE LINE BELOW TO REFLECT DESTINATION DRIVE LETTER
del E:\A_Backup.txt
set input =
set /p input=Clean CompactFlash(YyNn):
echo You entered: %input%
if %input% EQU y goto DelRmdir
if %input% EQU Y goto DelRmdir
goto CONVERT
:DelRmdir
REM EDIT TWO LINES BELOW TO REFLECT REMOVABLE MEDIA DRIVE
echo You are about to CLEAN the FlashCard...
format I: /q /v:
:CONVERT
set input =
echo FORMAT E:\CONVERT
set /p input=CLEAN E:\CONVERT (YyNn):
echo You entered: %input%
if %input% EQU y goto DeleteConvert
if %input% EQU Y goto DeleteConvert
goto END
:DeleteConvert
D:
rmdir E:\CONVERT /s/q
:END
pause
|