Nov 22, 2009

Help With File Renaming Based On An Excel Spreadsheet

free web hosting
Open Discussion & Free Web Hosting > Computers & Tech > Software > Business & Productivity

Help With File Renaming Based On An Excel Spreadsheet

FelipePosada
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.

Comment/Reply (w/o sign-up)

vujsa
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

Comment/Reply (w/o sign-up)

kelvinmaki
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

Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : file, renaming, based, excel, spreadsheet

  1. MS Excel -- Automatic Update Of Data
    (11)
  2. Adobe Release Acrobat 3D
    including 3D model in PDF file (2)
    PDF has become the most popular online document format in this few years. It is mainly because of
    the compatibility in every computer platform. All you need is an Adobe Acrobat Reader. However,
    Acrobat support text and 2D graphs only. Recently, Adobe released a new version of Acrobat, Acrobat
    3D. This new Acrobat 3D allow user to include 3D model into a PDF file. And it can be open with
    Adobe Reader. It support major 3D model file format, including 3D Studio Max and AutoCAD. files
    that produced by Acrobat 3D can be opened by Adobe Acrobat Reader version 7.0. I did ....
  3. Renaming Files (Using Excel Spreadsheet)
    (26)
    Hi, I want to use filenames on my Excel Spreadsheet for the files I have in my folder. For example,
    let's say I have these in a folder: Reportdummy.doc Charts102.xls DecemberGraphs.xls
    TestScrap.txt etc... And I have this in my Excel spreadsheet: Report1.doc Charts.xls Graphs.xls
    Scrap.txt etc... Is there an easy way for me to copy the cell's value to the file in that
    folder? I want them to be copied exactly in that order. So far I have to do this manually (copy
    from Excel, then rename and paste for each file). Thanks.....
  4. Excel Question
    (2)
    I am trying to make a spreadsheet that will automatically add the numbers in the first two collumns
    in every row and write the answerin the third collumn, but I'd like it to carry over for every
    row after that, but without me having to set it to add them, does anybody know how to do this?....
  5. Excel - Verifying Data...
    (3)
    Hi, I have an Excel spreadsheet here that has 4 columns in it. The Date, some number, and whether
    it was received or not. I have the Not Received column highlighted in blue color. But what I want
    to do is that if there is an X marked in the column for Received, and the number matches to the one
    that's not received, I want the blue color to be changed to the default black again. As of now,
    I'm doing a lot of this manually. So, for example: Date Number Received Not
    Received 10/1/05 123 X 10/4/05 456 X 10/8/05 12....
  6. Pdf Plugin For Excel?
    is there a way to export to pdf in excel (6)
    Hey, Just curious if anyone knows if tehre is a plug in of some sorts for excel that allows you to
    export to pdf format instead of the usual excel document? In open office they allow you to export
    to a pdf format, for the last little while I've been creating spread sheets within excel and
    then porting them over to open office and exporting from there to pdf format (either that or
    creating the document right in open office). When I do create the documents in excel and then move
    them over to open office to export something always seems to change within the document t....

    1. Looking for file, renaming, based, excel, spreadsheet

See Also,

*SIMILAR VIDEOS*
Searching Video's for file, renaming, based, excel, spreadsheet
advertisement



Help With File Renaming Based On An Excel Spreadsheet

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com