Simple batch file problem

Associate
Joined
20 Jan 2004
Posts
1,379
Hi guys

Trying to create a batch file to copy a whole directory to a location on another server.

I also need it to name the folder the current date.

In its current state it does copy the contents but it just dumps it in the folder without creating the dated folder correctly.

Heres the text :

xcopy /e /h /y \\legolas\hal_r \\manfriday\backup\legolas_backup_20092609

for /f "tokens=1-5 delims=/ " %%d in ("%date%") do rename "\\legolas\hal_r" %%d-%%e-%%f-%%g



If anyone can tell me where I went wrong I'll love them forever!

Thanks. :)
 
Back
Top Bottom