Sunnyboy Posted September 28, 2010 Report Share Posted September 28, 2010 Hi evryone, I've tried to look over the previous post to find a related post. My search was not successfull. So heres my issue. I'm trying to copy a file from one folder to an other one from a txt file list. My list contains a number of file I need to copy Example : (File #1) 123456789.doc (File #2) 144400012.doc The file path for each file will vary depending on the first 4 numbers of the file. (File #1) C:\Windows\1234\123456789.doc (File #2) C:\Windows\1444\144400012.doc My question now is how do i use the File command: Files/Folders >Copy File or Files with a variable such as (%T1%) in the file(s) Path Name. If it can be used with tha function, how can I do it. Thanks evryone for your help. Louis Quote Link to comment Share on other sites More sharing options...
kevin Posted September 28, 2010 Report Share Posted September 28, 2010 how do i use the File command: Files/Folders >Copy File or Files with a variable such as (%T1%) in the file(s) Path Name. Anywhere you can type something, like the Copy File or Files command dialog, you can include variables. This should get you started: // Get the Windows directory Variable Set String %T10% from Environment Variable Text File Begin Process: "input.txt" // Copy first 4 characters of filename Variable Modify String: Copy Part of %T1% to %T2% Copy File or Files: "%T1%" Text File End Process The macro is attached. Sample CopyFilesUsingVariable.mex Quote Link to comment Share on other sites More sharing options...
Sunnyboy Posted September 29, 2010 Author Report Share Posted September 29, 2010 Thanks for the info. I realize it works for regular file. However the command doesent seem to work with zip files. I taught it was the same. Macro express can't seem to find my file within the zip file. Is there a way to work it out? Thanks, Quote Link to comment Share on other sites More sharing options...
kevin Posted September 30, 2010 Report Share Posted September 30, 2010 Macro Express does not have a built-in .zip file handler. You will need to extract the files from your .zip file and then use a macro to copy them. Macro Express can be used to automate the program used to extract from the .zip file. Quote Link to comment Share on other sites More sharing options...
Sunnyboy Posted October 14, 2010 Author Report Share Posted October 14, 2010 Thanks Kevin for the information provided. It's very appreciated! 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.