Author Topic: First batch file attempt  (Read 3151 times)

kuppo6

  • Newbie
  • *
  • Posts: 9
    • View Profile
First batch file attempt
« on: February 29, 2008, 01:59:19 PM »
I want to write a batch file that will move files of a certain extension that are older than 30 days to an archive directory. For example, move all .txt files in C:\someFolder\otherFolder to D:\anotherFolder\archive that were created 30 or more days ago.

How can I get the current date to compare to the date the file was created?
How can I specify that only a certain type of file be moved?

Is this type of thing possible in a batch file or should I use something else?

Thanks for any help.
_________________
salon fashion games atlanta mortgage

Engineer Forum

First batch file attempt
« on: February 29, 2008, 01:59:19 PM »

Paul Tracey

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: First batch file attempt
« Reply #1 on: October 30, 2008, 06:44:31 PM »
I run the show for TurboCAD for the UK. If you send the exact info to me I'll send it on to one of my technicians  who will solve it if it's possible.
Paul, ptracey@avanquest.co.uk

SomeBoy

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: First batch file attempt
« Reply #2 on: January 10, 2010, 11:03:15 AM »
I want to write a batch file that will move files of a certain extension that are older than 30 days to an archive directory. For example, move all .txt files in C:\someFolder\otherFolder to D:\anotherFolder\archive that were created 30 or more days ago.

How can I get the current date to compare to the date the file was created?
How can I specify that only a certain type of file be moved?

Is this type of thing possible in a batch file or should I use something else?

Thanks for any help.
_________________
salon fashion games atlanta mortgage


I don't think it is possible with batch file, plus you need to run it manually everyday. ;)
« Last Edit: January 10, 2010, 11:03:50 AM by SomeBoy »