Hi,
I have filenames populated in Column A and what they should be renamed to in Column B. Something like this:
<table width="266" border="0" cellpadding="0" cellspacing="0"><col style="width: 100pt;" width="133" span="2"> <tbody><tr style="height: 15pt;" height="20"> <td class="xl63" style="height: 15pt; width: 100pt;" width="133" height="20"> A</td> <td class="xl63" style="border-left: medium none; width: 100pt;" width="133"> B</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt; border-top: medium none;" height="20">18464112_1_31_2010</td> <td class="xl64" style="border-top: medium none; border-left: medium none;" align="right">64112</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt; border-top: medium none;" height="20">18476972_1_31_2010</td> <td class="xl64" style="border-top: medium none; border-left: medium none;" align="right">76972</td> </tr> </tbody></table>
So the files are renamed to the last 5 digits of the number, excluding the date.
Filenames listed in column A are all saved in the same folder.
What I need is a macro that will search for the file listed in column A in the folder, rename it as per column B, and save it in a new folder..
steps:
1. locate file listed in column A in the folder(C:\files),
2. Copy the file to the new folder(C:\renamed_files),
3. Rename as per column B
I need the files to be at both locations. It should not delete/move the file. Just copy and rename. Is it possible to do this using excel VBA?
Thanks in advance for your help.
I have filenames populated in Column A and what they should be renamed to in Column B. Something like this:
<table width="266" border="0" cellpadding="0" cellspacing="0"><col style="width: 100pt;" width="133" span="2"> <tbody><tr style="height: 15pt;" height="20"> <td class="xl63" style="height: 15pt; width: 100pt;" width="133" height="20"> A</td> <td class="xl63" style="border-left: medium none; width: 100pt;" width="133"> B</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt; border-top: medium none;" height="20">18464112_1_31_2010</td> <td class="xl64" style="border-top: medium none; border-left: medium none;" align="right">64112</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt; border-top: medium none;" height="20">18476972_1_31_2010</td> <td class="xl64" style="border-top: medium none; border-left: medium none;" align="right">76972</td> </tr> </tbody></table>
So the files are renamed to the last 5 digits of the number, excluding the date.
Filenames listed in column A are all saved in the same folder.
What I need is a macro that will search for the file listed in column A in the folder, rename it as per column B, and save it in a new folder..
steps:
1. locate file listed in column A in the folder(C:\files),
2. Copy the file to the new folder(C:\renamed_files),
3. Rename as per column B
I need the files to be at both locations. It should not delete/move the file. Just copy and rename. Is it possible to do this using excel VBA?
Thanks in advance for your help.
