I'm trying to move the file to the desired path using the Windows batch script. (.bat) However, this error occurs and the code is not performed.
value for '/c' option cannot be more than 253 characters
I haven't found a way to solve this. How can I fix this code?
forfiles /p %sourceDir% /d %date% /c "cmd /c if exist %backupDir%\@file ( echo @file 'Backup File Found' ) else ( if exist %targetDir%\@file ( echo @file 'Target File Found' ) else ( if /i @ext==\"partial\" ( echo @file 'Download is in progress' ) else ( copy @file %targetDir% ) ) )"