![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Windows & DOS: Issues & Discussions Questions involving Unix to Windows (Desktop or Server) go here. Any Windows/DOS questions should go here as well. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A Batch job to delete files from various directories | guruparan18 | Shell Programming and Scripting | 3 | 05-10-2008 01:31 PM |
| Batch delete specific folder from user home directories | nipodrom | Shell Programming and Scripting | 2 | 05-09-2008 03:22 AM |
| bash - batch script for extracting one file from multiple tar files | kuliksco | Shell Programming and Scripting | 4 | 11-12-2007 11:34 PM |
| batch delete using find, files with # character | tphyahoo | UNIX for Dummies Questions & Answers | 0 | 05-30-2006 09:05 AM |
| How can I delete files using a file that containt path and names? | AlvaroD | UNIX for Dummies Questions & Answers | 2 | 09-25-2001 09:51 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Schedule a Batch file to delete files at particular intervals
Hi,
I need to write a batch file/shell script that runs at specified intervals daily and deletes specified set of files. Can anyone pls help me with the code. Thanks, Indom. |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Please read the forum rules. You should perform searches before asking questions (this question having been answered several times). You should also post to the correct forum. This isn't an "advanced" topic.
Deleting files over 7 days old Cheers, Keith |
|
#3
|
|||
|
|||
|
Schedule batch job
Hi,
This is the batch file I have created to delete files. echo off rm -rf C:\\DDRIVE\\RD\\newfolder\\temp\\* echo All The files have been deleted For every 15 minutes we get the data and it should be deleted at the 13th minute. can anyone pls tell me how to schedule to every 13th min daily. Unable to get the syntax right for AT command. Thanks, Indom |
|
#4
|
||||
|
||||
|
Sounds like you'll want to set up a cron job. Read through this site and see if it'll work for you:
http://www.webmasters-central.com/t/cron.shtml |
|
#5
|
|||
|
|||
|
the fact your useing a "C:\" drive says you are trying to do this on a windows machine.
you will have to find a schedular for windows. i think win XP comes with one by default. but reguardless you asked the question in the wrong forum. |
|
#6
|
||||
|
||||
|
Wow, you have a good eye.
|
|
#7
|
|||
|
|||
|
I'm not sure on the syntax, check your help on the machine your using the at command. Don't know what your running on, but you seemed to be mixing the two OS commands.
try windows "at" command: Local Machine at 13:30 cmd /c "del C:\DDRIVE\RD\newfolder\temp\*" Really need to read the help pages. If its on a remote computer then you need to designate that after "at" at \\somecomputer 13:30 cmd /c "del c:\DDRIVE\RD\newfolder\temp\*" |
|||
| Google The UNIX and Linux Forums |