Greetings,
Long time reader, the site and forums has tons of info. Thanks for everything you have all contributed.
Below is a script I wrote to make a backup of a networked location onto my local. The script creates a file for today in a location, and then uses that dynamic location to backup the files to.
@echo off
set today="%date:~10,4%-%date:~4,2%-%date:~7,2%\LeadResources"
echo %today%
md "C:\Backups\%today%"
pause
xcopy "P:\XXXXX\XXXX\XXX\XXX" "C:\Backups\%today%" /L /S /I /-Y /EXCLUDE:C:\BatchF~1\Backup~1\LeadBa~1\BackupExclude.txt >> "C:\Batch Files\Temp\BackupResults.txt"
goto :end
The script successfully creates the dated folder and the nested LeadResources folder from the md command, but the xcopy does not move anything over.
Looking at the BackupResults.txt file shows lines such as this:
...
P:\XXXXX\XXXX\XXX\XX\ZZZZ\ZZZ.xls
P:\XXXXX\XXXX\XXX\XX\ZZZZ\BBBxls
298 File(s)
This output leads me to believe that xcopy is successful in copying the files, but the files are not in the directory.
Any help that can be provided would be very much appreciated, I'm at a loss here.