Thanks, Jim I will try this... Thank You, Robert Williams Senior Network Administrator Raypak, Inc. rwilliams@xxxxxxxxxx Phone - 805-278-5352 -----Original Message----- From: Jim Kenzig [mailto:jimkenz@xxxxxxxxxxxxxx] Sent: Thursday, May 01, 2003 7:40 AM To: thin@xxxxxxxxxxxxx From Windows NT magazine. JK How can I create an NT shell script that deletes files with a date older than MMDDYY from a directory? To delete files by date, you need to install the Microsoft Windows NT Server 4.0 Resource Kit's Robocopy utility. Robocopy has a switch that lets you specify whether you want to copy or move files that are older than a certain age. You then take these steps: Set up a directory in which to put the old files that you want to delete. Name the directory OldFiles or a similar intuitive name. Robocopy will move users' old files into this OldFiles destination folder. ;Write a script that first deletes all the files and folders in the OldFiles folder and then calls Robocopy. Listing 2 contains a script that you can adapt. In your script, have Robocopy move all the files that are older than a specified number of days (e.g., 120 days) or a specified date (e.g., 070199) from the source directory to the OldFiles folder. Robocopy automatically clears the source area of any old files, and you can use the /move switch instead of the /mov switch to clear any empty directories. Schedule the script to run at a specified interval with the Net Use command. Keeping users' old files in the OldFiles folder until the next scheduled deletion run rather than immediately deleting them can save you work down the road. If users need a file that Robocopy removed, you can restore the file from the OldFiles folder rather than from the backup tape. Robocopy is powerful and can do real damage if you get the switches wrong. However, if you use Robocopy carefully, it will become another valuable addition to your NT toolkit -----Original Message----- From: thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx]On Behalf Of Robert Williams Sent: Thursday, May 01, 2003 10:28 AM To: 'thin@xxxxxxxxxxxxx' Subject: [THIN] OT: tool to delete files based up date? What is a quick tool I can use to delete files based upon a date? Thank You, Robert Williams Senior Network Administrator Raypak, Inc. rwilliams@xxxxxxxxxx Phone - 805-278-5352 ******************************************************** This Week's Sponsor - Emergent Online EOL's Universal Printer new Features include: Network Printing, Pagestreaming, 2400 DPI. No Client Software Required! http://www.go-eol.com/ ********************************************************** For Archives, to Unsubscribe, Subscribe or set Digest or Vacation mode use the below link: http://thethin.net/citrixlist.cfm ******************************************************** This Week's Sponsor - Emergent Online EOL's Universal Printer new Features include: Network Printing, Pagestreaming, 2400 DPI. No Client Software Required! http://www.go-eol.com/ ********************************************************** For Archives, to Unsubscribe, Subscribe or set Digest or Vacation mode use the below link: http://thethin.net/citrixlist.cfm ******************************************************** This Week's Sponsor - Emergent Online EOL's Universal Printer new Features include: Network Printing, Pagestreaming, 2400 DPI. No Client Software Required! http://www.go-eol.com/ ********************************************************** For Archives, to Unsubscribe, Subscribe or set Digest or Vacation mode use the below link: http://thethin.net/citrixlist.cfm