October 2nd, 2009, 07:11 PM
Emptying a folder, not delete it.
Im trying to get a script running.
It should be able to delete all folders and files in a dir, Not delete the root folder.
Ive searched for a script like this, but come up empty, exept for this.. ive modifyed it slightly..
dir /b /ad c:\test > dirlist.txt
for /f %%i in (dirlist.txt) do rd /s /q c:\test\%%i
This does the job, exept if a folder has "space" in it
it can not delete that folder.
In the end the script would act as follows,
COPY all Folders and Files
DELETE all folders and Files from "Desktop"(Not deleting Desktop)
After that i will manually go through "Death" and keep what is worth keeping.
December 18th, 2009, 11:57 PM
What programming language are you writing this in?