Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Echo OFF & Title SparkBooth Image Renamer Tool - Debug test for incoming files
- :: Date formatting.
- Set "Year=%date:~6,4%" & Set "Month=%date:~3,2%" & Set "Day=%date:~0,2%"
- :: The image sub-directory name.
- Set "subDirName=%Year%_%Month%_%Day%"
- :: The image base-name.
- Set "imageBaseName=Photo"
- :: The username (if any) to fill the log.
- Set "userName=Elektro"
- :: The amount of images to create.
- Set /A "imageCount=3"
- Echo: This script will create dummy files on the current
- Echo: directory to mimic SparkBooth's filesystem.
- Echo+
- Echo: 'SparkBooth Image Renamer Tool' should be monitoring for
- Echo: incoming files on this directory to debug the monitor results.
- Echo+
- Pause
- :Do
- CLS
- :: Create the subdirectory.
- (MKDir ".\%subDirName%")2>Nul
- :: Delete any previous image file.
- (Del /Q ".\%subDirName%\*.jpg")2>Nul
- :: Create dummy image files on the 'yyyy_MM_dd' sub-directory.
- For /L %%x In (1, 1, %imageCount%) Do (
- FSUtil.exe File CreateNew ".\%subDirName%\%subDirName%_%imageBaseName%_%%x.jpg" "0"
- )
- :: Create dummy image files on the 'Singles' sub-directory.
- For /L %%x In (1, 1, %imageCount%) Do (
- FSUtil.exe File CreateNew ".\Singles\%subDirName%_%imageBaseName%_%%x.jpg" "0"
- )
- :: Create the SparkBooth log with the default header.
- If Not Exist ".\log.txt" (
- (Echo:filename name email comment twitter phone)>".\log.txt"
- )
- :: Add an entry into the log.
- (Echo:%subDirName%_%imageBaseName% %userName% )>>".\log.txt"
- Echo+
- Echo: Done!
- Echo+
- Choice.exe /C "YN" /M "Repeat"
- If %ErrorLevel% EQU 1 (Goto :Do)
- Exit /B 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement