1.

Solve : small batch program's I find and make enjoy from DeltaSpider?

Answer»

I GUESS I will keep it as is with XCOPY. From what I understood a regular copy does not allow the copying of SUBFOLDER especialy if they are empty. I do need to structure a way in which I can have the files backed up on Tuesday go to a folder called Tuesday and so on. What would be the best lay out for this?Depending on your regional settings, you can use the value of the date command:

Code: [Select]@echo off
for /f "tokens=1,2" %%x in ('date /t') do (
set dow=%%x
)
if %dow%=Mon set folder=c:\Monday
if %dow%=Tue set folder=c:\Tuesday
.
.
.

Try running the date /t command at the command PROMPT. You may not even have the day of week showing in the output which will make this all the more difficult.

Good luck. This is the output I use as the default for all machines: Thu 04/26/2007

@echo off
for /f "tokens=1,2" %%x in ('date /t') do (
set dow=%%x
)
if %dow%=Mon set folder=c:\Monday
if %dow%=Tue set folder=c:\Tuesday

I would assume that in the two 'if' lines I have to specify the direct path to the folders I have created? Will all these commands work on XP pro?Sidewindes,

I PLACED the code that you provided and got a '=Mon was unexpected at this time' message. What are the areas I must modify other than the folder paths? Is there something I missed?



Discussion

No Comment Found