Delete

(imported topic written by wnolan91)

Does anyone know if there are some switches with the delete to force the deletion of a directory?

(imported comment written by Shawn_Jefferson)

I think you can use “RD /S /Q” which should delete the whole directory tree, in Win XP anyway.

(imported comment written by jessewk)

Here’s an action I’ve used before:

delete __appendfile
delete deldir.cmd
appendfile @ECHO OFF
appendfile rmdir /S /Q “c:\path\to\the\folder” > NUL 2> NUL
move __appendfile deldir.cmd
run “{pathname of client folder of site “BESSupport” & “\RunQuiet.exe”}” deldir.cmd
delete deldir.cmd

(imported comment written by wnolan91)

These work fine if the file in not in use… But so did the delete.

To be more specific… the error I get is:

“The process cannot access the file because it is being used by another process.”

I could use pkill if it was a know process, but they are unknown.

There should be a way to force the deleting of the file. Still need a bit more help.

Thanks

Bill