When i try to delete an empty folder i got "the dirctoy name is invalid"

Dec 11, 2017
16
0
Hi,

I have a script that run automatically from remote server to another to delete old archive folders.
This script, delete a recursive folder, it runs every night and randomly failed.
The command for delete is rmdir /Q /S "%\\Path\to\the\Source%" (I used TCC of course)

I checked if there is an open process and i didn't find anything.
I also added the unlocker feature to my script and still nothing have been changed.
I tried the del command and its switches, tried purge by Robocopy and.. still randomly failed.

I need the right "magic" to solve this issue, Please help :)

Regards,
Chen
 
You may define almost any variable name by enclosing entire definition in quotes.
Like
Code:
SET "anything=yy"
 
Hi Rconn and AnrDeamon, sorry for the late response.

Leave the variable, it is just an example for a variable that contains a specific path.
 

Similar threads