Help With File Renaming Based On An Excel Spreadsheet
Discussion by FelipePosada with 3 Replies.
Last Update: December 18, 2009, 5:36 pm
The files are in the following convention, a four character prefix, underscore, a product name, underscore, "F08.jpg"
The Excel list is in the same convention except that the product name is not abbreviated.
When loading the images to be displayed on our website the software won't recognize the images unless the image names match with the names on the list. Can anyone suggest anything to automatically rename the images based on the four character prefix from the list?
Also, I think it should be mentioned that the prefixes are all different.
Perhaps a list of 10 filenames and their corresponding spreadsheet match. I could then run a few tests to see how to best write the script.
It would probably start by building an array for each then bridge them so that item 1 in array1 was the match in array2 etc...
Then just rename file with name in array1 with the name from the same in array2.
I'll await your reply.
The idea is by reading all the image files from that folder and moving the file object to what is stated in the excel spreadsheet.
1. create another folder to store all renamed images.
2. have a loop reading all the images from the current folder.
3. then read the stated name from the list of worksheet given.
4. moving the current selected images to the stated name to the new folder (created at step 1).
I've also found some information and sample code for renaming files in Excel in the internet. You can reference to it if you want. But of course if all these are pretty troublesome, then maybe you can wait for vujsa program. Hope some of it help you started. Cheers
how do I prevent excel to change the format of my date
example I typed 12-11-2008 but it is automatically converted to 12/11/2008
I tried adding a single quote before the date ex. '12-11-2008
its seems working then I have to save my work as a .Csv file
when I'm trying to open it again in excel its showing 12/11/2008
I tried to verify the file using notepad and still it is showing exactly what iwant something like 12-11-2008,ABC,100
seems like excel is changing the display of my date
please help thanks
|Hipergate Installation Services Required Request Posted at the Trap17 Forum (1)||(2) Pdf Split And Merge|