DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: File labeling tool  (Read 5,422 times)

KoenFugro

  • Participant
  • Joined in 2008
  • *
  • Posts: 26
File labeling tool
« on: January 13, 2009, 03:46 PM »
Hi people,

I have a bunch of files, with a solid prefix and a random numer. These files are listed in an excel sheet.
The sheet has a few row's. Next to the row witch contains the original file name, is a second row, containing extra information about the file and that information must become part of the filename.

Is there a way to read out the second row of the excel sheet and apply the data in that cell to the file - names i have?
This is about 10000+ files, so i would be glad if this is something I don't have to do by hand :'( :(

So what must happen is that some program makes a file list, then compares the file list with the file names in ms excel in row 1, then paste the information in the second row to the file name.

For more information ask me!
Thanks in advance!

Koen

kwacky1

  • i am Cody's cousin
  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 182
    • Participated in NANY Challenge Once
    • Coding Snacks
Re: File labeling tool
« Reply #1 on: January 14, 2009, 04:32 AM »
Do I understand correctly that column 1 contains the current filename and column 2 contains the desired file name?

Can you export the file to csv?
ie. oldfilename,newfilename

Does your spreadsheet contain full path names or would the program need to search for the files?

I have attached a basic script that assumes the following
  • the files to be renamed have the full path specified or are in the current directory
  • the list of files is in csv format with only 2 columns
« Last Edit: January 14, 2009, 04:43 AM by kwacky1 »

Original address: https://www.donationcoder.com/forum/index.php?topic=16569.0