For the last year I have been downloading cash register X1 and Z1 files onto an SD card. Each night's files (X1 & Z1) are stored in a new folder with the naming convention "RP + [DATE]", (EX: RP120910, [YYMMDD]). I have 265 folders!!!<br><br>
I need to go through each folder, select the Z1 file (I don't care about the X1, X2 or Z2 files) and rename each with the following naming convention: "Z1 + folder_name + .xls". For Example: Folder RP120910 contains the Z1 file named "Z1_T1729.ECR". After renaming, the file should be "Z1RP120910.xls".<br><br>
As the VBA code loops through each subfolder, selecting and renaming the Z1 files, I would like the new files to be placed into a new folder named "Z1Files".<br><br>
Note: All subfolders are currently in a directory named "RegisterFiles". I am using Excel 2010.<br><br>
Can someone please save me from having to manually go through each file and rename it. I would greatly appreciate any help.
I need to go through each folder, select the Z1 file (I don't care about the X1, X2 or Z2 files) and rename each with the following naming convention: "Z1 + folder_name + .xls". For Example: Folder RP120910 contains the Z1 file named "Z1_T1729.ECR". After renaming, the file should be "Z1RP120910.xls".<br><br>
As the VBA code loops through each subfolder, selecting and renaming the Z1 files, I would like the new files to be placed into a new folder named "Z1Files".<br><br>
Note: All subfolders are currently in a directory named "RegisterFiles". I am using Excel 2010.<br><br>
Can someone please save me from having to manually go through each file and rename it. I would greatly appreciate any help.
Last edited: