Computing.Net > Forums > Programming > batch file to delete folders/files

batch file to delete folders/files

Reply to Message Icon

Original Message
Name: lfcfaninoz
Date: January 23, 2008 at 17:53:36 Pacific
Subject: batch file to delete folders/files
OS: win server2K
CPU/Ram: 2gb
Model/Manufacturer: dl360 g4
Comment:

Hi,
I am new to batch scripting and need some help from all your genius' out there.
I want to write a script that will delete files older than 14 days from a public server at work.
I want to leave any folders in place if possible.
I think i have the script to delete the files but i dont know how to step down through the directory tree.
any help would be greatly appriciated
Steve


Report Offensive Message For Removal

Response Number 1
Name: Razor2.3
Date: January 23, 2008 at 18:50:08 Pacific
Subject: batch file to delete folders/files
Reply: (edit)

If you're using a FOR, use FOR /R.


Report Offensive Follow Up For Removal

Response Number 2
Name: Mechanix2Go
Date: January 23, 2008 at 22:22:11 Pacific
Subject: batch file to delete folders/files
Reply: (edit)

If you've figured out the 'older than 14 days' bit, I like to hear about iit.


=====================================
If at first you don't succeed, you're about average.

M2



Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: batch file to delete folders/files

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software