tags:

views:

58

answers:

1

Am having a batch file used to update certain files. However when i try to delete a file from a specified folder i am getting error "Invalid syntax, directory".

The command is below del /Q %INSTDIR%\xyz.dll

The %INSTDIR% is taken from registry and is correctly processing any copy commands. But am getting error for del command. Please help

+4  A: 

Try this:

del /Q "%INSTDIR%\xyz.dll"

Most likely %INSTDIR% has spaces in it sometimes and thus the failure. You must place double quotes around long file/folder names.

AngryHacker