I wrote a small script in a bat file that I use to create backups of a folder on my computer:
rmdir "Folder - Backup (Old)" /S /Q
move "Folder - Backup" "Folder - Backup (Old)"
mkdir "Folder - Backup"
xcopy /e /h "Folder"\*.* "Folder - Backup"
I recently moved "Folder" along with the backup script into a new directory and now the script isn't working:
move "Folder - Backup" "Folder - Backup (Old)"
The filename or extension is too long.
0 dir(s) moved.
I'm guessing this is caused by the full file path of Folder
being too long, but I don't have this problem when I rename the folder using Windows Explorer so it's not like this operation isn't possible in Windows. Is there a work-around for this problem?