Hi all,
Recently, I have create robocopy batch file the following are the code use:
@echo off
rem Copy folders and subdirectories.
robocopy "C:\Users\Owner\Desktop\New folder" "K:\New folder" /e /w:1 /r:5 /zb
robocopy "C:\Users\Owner\Desktop\New folder (2)" "K:\New folder2" /e /w:1 /r:5 /zb
rem Copy specified files in the folders and subdirectories folders.
robocopy "C:\Users\test\Documents" "D:\Outlook" "Bowling Competition 2015 (Inter-Site).xlsx" /w:1 /r:5 /zb
echo.
:exit
pause
After running the batch file as administrator, I receive the following error: The filename, directory name, or volume label syntax is incorrect. But the file has been transfer successfully, and I am able to view the file. Anyone has any solutions or did I need to add in additional commands in order to rectify the error.