Jump to content
Macro Express Forums

Moving Files


Recommended Posts

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:


Files dated August 2, 2007 are moved to:



Thanks in advance.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...