1mitchelle2 Posted May 30, 2014 Report Share Posted May 30, 2014 Hi, I am new to this site and wondering if anyone can help me on how to copy a specific file within a folder. Thanks See attach file. Folder name: Offset File\1 Files to copy: 1_1-18_00004s(25C).akx_phase 1_1-18_01876s(260C).akx_phase Quote Link to comment Share on other sites More sharing options...
dcman98 Posted June 2, 2014 Report Share Posted June 2, 2014 I copy and rename several hundred files a month, and since I'm doing data entry on them as well, I use Excel to duplicate my efforts. The basic way to do this is to have an excel sheet with a column of file names that you wish to copy, and if applicable, other columns with a new name, or a new destination folder. Have the Macro copy the contents of the first cell into a variable %T1%, move one cell to the right and put the new name into variable %T2%, then move one more cell to the right and set the new folder as variable %T3%, and then use the Copy File or Files command and set the Path to be C:\Offset File\1\%T1%.akx_phase, then for the new name, put in C:\%T3%\%T2%.akx_phase. This will copy the files to a new location. If your table were as follows: 1_1-18_0004s(25C) A Waffle 1_1-18_01876s(260C) B Waffle Then after running the macro, you could go to C:\Waffle, and find two files A.akx_phase and B.akx_phase Note: You will need to use the trim command on the variables to clean them up before you can use them in the name. If I recall correctly, the copied excel cell includes a carriage return. Edit: Another method just occurred to me, and it may work better if you're only doing one or two files, especially if they have long complicated names. You could use the Variable Set String and use Set Value to File Name (Prompt). This will open up a box for you to select the file, and set the filename to variable %T1%. Then use that same command and use prompt for value, then in that box type the new name you want and set that as varible %T2%. Then you could use the copy command with just %T1% as the name, and then put in the path you want to copy the file to, and append to that the %T2%.akx_phase Let me know how it works. Quote Link to comment Share on other sites More sharing options...
acantor Posted October 9, 2014 Report Share Posted October 9, 2014 Do you mean that you want to copy a specific file to the clipboard? Or copy the file and paste it into a different folder? Or copy a file that you previously selected? Or duplicate a file in the same folder but with a different name? 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.