bookmark - Help With File Renaming Based On An Excel Spreadsheet

Help With File Renaming Based On An Excel Spreadsheet

 
 Discussion by FelipePosada with 3 Replies.
 Last Update: December 18, 2009, 5:36 pm
 
bookmark - Help With File Renaming Based On An Excel Spreadsheet  
    
free web hosting
 
Hey everyone, my problem is I have a folder full of images that I need to rename to match a list of names I have in an excel spreadsheet. There are roughly 1200 images and I was wondering if there was any way to automate this process.

The files are in the following convention, a four character prefix, underscore, a product name, underscore, "F08.jpg"
Example: AA4G_NuptseJkt_F08.jpg

The Excel list is in the same convention except that the product name is not abbreviated.
Example: AA4G_NuptseJacket_F08.jpg

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.

Fri Nov 30, 2007    Reply    New Discussion   


I may be able to write a script in PHP that will do the job for you but I would need a little data.

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.

vujsa

Sat Dec 1, 2007    Reply    New Discussion   

Or instead of using PHP to code, you can try using the Microsoft Excel Macro Editor to create a small program to do the file renaming for you. There's this website that I've found it quite useful, at least it gives you the basic idea. http://www.mrexcel.com/archive/VBA/4832.html.

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

Mon Dec 3, 2007    Reply    New Discussion   

excel changing my input of dateHelp With File Renaming Based On An Excel Spreadsheet

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

 


Fri Dec 18, 2009    Reply    New Discussion   


Quickly Post to Help With File Renaming Based On An Excel Spreadsheet  w/o signup Share Info about Help With File Renaming Based On An Excel Spreadsheet  using Facebook, Twitter etc. email your friend about Help With File Renaming Based On An Excel Spreadsheet Print
Reply / Comment Ask a Question? Share / Bookmark E-Mail a Friend Print

Hipergate Installation Services Required Request Posted at the Trap17 Forum  Hipergate Installation Services Required Request Posted at the Trap17 Forum (1) (2) Pdf Split And Merge   Pdf Split And Merge