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
 
Aug 23, 2010
636
9
You may define almost any variable name by enclosing entire definition in quotes.
Like
Code:
SET "anything=yy"
 
Dec 11, 2017
16
0
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
Thread starter Title Forum Replies Date
C "Failed to update the system registry. Please try using REGEDIT" Support 3
Alpengreis Fixed 0xc0000005 while try to create a button (Schaltfläche) Support 4
J Colors in tcmd (one more try) Support 1
vefatica Please try to reproduce this Support 20
A Installers delete EVerything service if already installed Support 0
I zip /M fails to delete file after adding to zip file Support 2
D SYNC /W copies back instead of propagating a delete Support 2
M Delete multiple Alternate Datastreams Support 5
D safe delete files command Support 10
P How to? Delete subfolders but not the folder itself Support 11
P Can't do something to a file and then delete it? Support 6
nickles WAD del unable to delete files ending in "." Support 18
gschizas Fixed Cannot use extended path to delete invalid file Support 3
M Can't delete files... Support 8
aedthuio REG ADD/DELETE Support 1
vefatica Cut/delete Support 3
D TCMD16 Delete Toolbar Button bug Support 7
G FOLDERMONITOR created also firing for delete (and maybe other events) Support 7
T How to? Select and Delete text Support 6
Joe Caverly How to? Delete a line from a file Support 4
CWBillow Delete based on dates Support 5
JohnQSmith How to? Delete descriptions Support 2
vefatica How do I delete "spaces.txt "? Support 21
A How to? Instruct COPY to delete file if only partially copied (via FTP) Support 8
M Why am I unable to delete files? Support 8
R Delete command sets directory attributes to hidden & system Support 46
S 4NT - delete from command prompt and recycle bin Support 12
Phileosophos COPY /W does not delete files in the target Support 4
T Possible to delete the new standard tab? Support 1
P Sync /w won't delete in ftp folder Support 1
gentzel Directory stack empty when running TCEXIT? Support 9
M WAD "Pictures" directory is empty in TCC but not in CMD or Explorer Support 4
thorntonpg sync /S /F creating empty directories Support 5
T input accepts empty answer Support 5
D Directory stack empty Support 1
vefatica Empty .watch files saved Support 0
M Forums appear empty if I'm not logged in Support 2
A How to? Frozen session tab with "ERROR: The file is either empty or does not contain the valid choices." Support 19
C How to? List empty folders Support 21
L WAD File-popup Window nearly empty Support 6
T dir /h error in empty directory Support 22
C MOVE making empty destinatation sub-folders Support 10
D LIST command wierdness with empty Unicode file Support 1
vefatica DO variable left with empty value Support 0
rconn Installer leaves directory empty Support 7
CWBillow Ditching empty folders Support 11
Charles Dye Create empty registry value? Support 5

Similar threads