Jump to content
Macro Express Forums

Macro Help


elovelace256

Recommended Posts

I am trying to create a macro that will copy the event logs off of server A and place them out on a share drive. This needs to happen everday so I need the macro to create a new folder everyday and place the files in the folder. Then the next day repeat the process.

So I guess my question is can you have macro express dynamicly create the folders based on the date? Or pull the info file the file creation date? Then once macro express creates the folder have the name stored in a variable and then copy the file the that variable.

 

Make sense? If not let me know. Any help would be appreciated. Or maybe there is a diffrent way to go at this

 

THanks,

 

Eric

Link to comment
Share on other sites

You can copy or create a file with dates in the filename by placing the filename and, if needed, the filepath in a variable. You can do either of the things you suggest:

 

Use the Date/Time command to get put the date into a variable in nearly whatever format you can think of.

Date/Time: Save "yyyymmdd" into %T1%

If you are using Windows XP/2000/NT with the NTFS file system you can use the Variable Set From File Date/Time command to get the file's creation, modified, or last accessed date.

 

If you are using Windows Me/98/95 you can use the Variable Set From File Date/Time command to get the file's modified date.

 

The Variable Set From File Date/Time puts the month, day and year in integer variables. These need to be converted to a string variable. Luckily, this is very simple:

Variable Set From File Date/Time
Variable Set String %T1% "%N1%%N2%%N3%"

Then use the Copy File or Files command to copy the file.

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.

Guest
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.

Loading...
×
×
  • Create New...