techtraf Posted July 22, 2010 Report Share Posted July 22, 2010 I have a client wants to FTP several files to our server about 45 of them each week. The files name are 96455878548202 etc... They are made up with 14 digits and they all unique. All I want to do is to go in that folder and rename each file as Blend_1, Blend_2 and so on... Can someone write a little macro code step-by-step or show me how to do this project. I'll appreciate the help on this one. I have a deadline by tomorrow to finish this macro. Thanks again everyone. Quote Link to comment Share on other sites More sharing options...
kevin Posted July 22, 2010 Report Share Posted July 22, 2010 Here is a macro that may get you started: Variable Set Integer %Count% to 0 Repeat with Folder e:\temp Rename File/Files: "%FileName%" to "Blend_%Count%" End Repeat This is a macro I quickly threw together. I did not test it. It is meant to help you get started. Sample Rename files in a folder.mex Quote Link to comment Share on other sites More sharing options...
techtraf Posted July 22, 2010 Author Report Share Posted July 22, 2010 I have like this but it did not work. No file rename. Please help. <VARIABLE SET INTEGER Option="\x00" Destination="%N[1]%" Value="0"/> <REPEAT WITH FOLDER Path="\\\\web\\D\\FTP\\users\\FedEx\\Inbound" OnlyFiles="TRUE" Destination="%T[1]%" FullPath="FALSE" ProcSubfolders="FALSE"/> <RENAME FILE/FILES Source="%T[1]%" Dest="\\\\web\\D\\FTP\\users\\FedEx\\Inbound\\Blend_%N[1]%" Progress="FALSE" Recurse="FALSE"/> <END REPEAT/> Quote Link to comment Share on other sites More sharing options...
Cory Posted August 2, 2010 Report Share Posted August 2, 2010 I am hyper busy at the moment so I can't write your macro for free but I am available for hire if you get desperate. I can vidconf, phone, remote meet or whatever works best for you. I can train as well. One thing to beware of is if you do a Repeat With Folder for which you are renaming the contents of can have strange results. I often create a list of file names in an array variable and then use that to rename. It's very simple and just one extra step. 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.