[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Use batch to delete all contents of a folder but leave the folder

Asked by MCG818 in Windows Batch Scripting

Is there a specific batch script that will delete EVERYTHING and I do mean EVERYTHING of all file types and folders with any name from inside a specific folder?

I do want to leave that folder intact.

I know i could delete the root folder then use "MD" to make another folder with same name.  I DO NOT WANT THAT.  Because of access reasons from remote server.  This will be used in a custom data csv export that will have a live connection updating every 15 secs.

Any help would be greatly appreciated.

FYI Just for reference folder is named "Test" on root of C.  (C:\Test)
[+][-]01/28/09 01:53 AM, ID: 23484931Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/28/09 01:54 AM, ID: 23484935Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625