Well Dropbox is a great program! I'm glad to make you know it!
I did the script in batch.
I had problems with the accents because of coding issues. I'm not sure what encoding uses, but I found in a forum how to 'know' the way to put it.
Here's the script:
- Code: Select all
@echo off
for /f "tokens=1 delims=, " %%b in ('date /t') do set CURR=%%b
::Print the 3letter day
::echo %CURR%
set MIERC=mi‚
set SAB=s b
IF %CURR%==lun set DAY=2
IF %CURR%==mar set DAY=3
IF %CURR%==%MIERC% set DAY=4
IF %CURR%==jue set DAY=5
IF %CURR%==vie set DAY=6
IF %CURR%==%SAB% set DAY=7
IF %CURR%==dom set DAY=1
for /f "tokens=%DAY%" %%a in ('echo Monday Tuesday Wednesday Thursday Friday Saturday Sunday') do set G=%%a
::Print the full day
::echo %G%
del /q "C:\Documents and Settings\user\Mis documentos\Dropbox\"%G%"\*.jpg"
I'll explain it a little:
- First I needed to change the region & time settings because the time command wasn't telling me the day in words (it only said 29/02/2012)
- About the accents, you can see that mié it's in a var with value mi, (so , equals é). I found it simply typing in the console copy con file.txt and then all the á é í ó ú Á É... and copying the correct character (I don't know why the á is invisible, but it seem it works, I'll see on saturday). I don't know what is the exact issue with that accents, but the IF didn't match that way, I tried saving the .bat in ANSI, UTF8 and some others but it didn't work. But it doesn't surprise me, I've already had problems with accents in C++ before.
And well the script takes the 3 letter day name from the date command (it's separated with a comma in my case) and then it sets the var DAY with the number of the next day (to delete the next day photos). I could set that var directly to the day name, but I already had the loop and well I used it to 'translate' the number to the day that YawCam uses for the {day} format.
Then it simply does the del command in the folder where all the photos are. I use a folder for every day, to store the photos during a week.
Well, I'll see in a few moments if the first scheduled run works or not.
I hope it can help someone, I think it'll do the job for me and I've learned a little batch (I don't know if I'll use it anymore, but it's nice to learn new things

)
edit: It seem it works. I've had some problems with the task manager but well, I think it's working now! (i'll have to wait for tomorrow to be sure if the scheduler is working

)