Raygan Posted September 4, 2007 Report Share Posted September 4, 2007 I have files I have to archive every month. They are filed according to the date they were modified so they can be reactivated later. I need help writing a macro to do this, that I can run once a month on files that are 30 days old. Here's an example. The files are located in L:\logos\scan\ Files with the modified date of august 1, 2007 need to be moved into the folder: j:\07\08\01\ Files dated August 2, 2007 are moved to: j:\07\08\02\ Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Cory Posted September 5, 2007 Report Share Posted September 5, 2007 I’m sorry I don’t have time right now to teach you how to write the macro but I’ll toss out a couple of ideas. First off you could do it completely in ME or you might want to use RoboCopy (Vista) or Xcopy (XP, 2000). These command line copy utilities have the option for date range parameters. This could make writing the macro a little easier. It just depends exactly how you want to do this. But it looks like it might be easiest to just do this one in ME. Simply process the folder with a Repeat With Folder command and put the file name and path in a text variable. Then use the Variable Set From File to break out the file name and extension to be used later in the copy command and then do it again for the YMD. Then use those date values in a File Copy Command string to construct your path. If you’re in a hurry I could write it for you for a nominal fee or if I have time later I can make a crude untested example for free. Quote Link to comment Share on other sites More sharing options...
Raygan Posted September 5, 2007 Author Report Share Posted September 5, 2007 I think what I needed most was how to proceed. I think with your input I should be able to write it myself with the help of some of my coworkers. All I need to do now is find some time. Thanks! Quote Link to comment Share on other sites More sharing options...
Namino Posted September 6, 2007 Report Share Posted September 6, 2007 I'm currently working on a similar macro, so I'll post what I've done so far here incase it is any help to you. But I'm not moving them into folders based on their date, I'm only adding them to a Winrar archive. Archive_files.zip Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.