#1 2008-04-25 01:35

AbsolutRaj
Member
Registered: 2008-04-24
Posts: 5

A huge problem, and an Excel renaming question

Hi all, I have a huge problem here, that I am trying to solve using renamer.

=I have a list of over 6000 folders that are all named in a sequence of of numbers and alphabets. (case numbers)

for example MKT-001908, MKT-001987, MKT-006250 etc...

These > 6000 folders have been broken up into groups of 100 folders

example
root\MKT-001900 thru MKT-002000\MKT-001908
root\MKT-001900 thru MKT-002000\MKT-001987
root\MKT-006200 thru MKT-006300\MKT-006250

There aren't always  folders for every sequential number.  For example, Folder MKT-003245 may be followed by MKT-003287.  The folders in the  middle are missing and I am not worried about them.

=I also have a an Excel spreadsheet that has a list of all the case numbers and preferred names.  The list has case numbers that don't necessarily have related folders.
Column A has the case/folder number. 
Columb B has the new preferred name for the folder

My question is:
Is there any way, I can have renamer,
1. Take each folder name in on the disk
2. Compare it to column A in the excel sheet
3. If a matching folder name - column name is found in a given row
4. Rename the Folder name with the contents of Column B of the same row.

Thanks so much in advance!

Offline

#2 2008-04-25 03:03

krtek
Senior Member
From: Łódź (Poland)
Registered: 2008-02-21
Posts: 262

Re: A huge problem, and an Excel renaming question

Hi,
It is possible. With ReNamer almost everything is possible.

If there are no duplicate names in the column with new names it will be quite easy.
(if there are duplicates, ReNamer will rename only one folder for each new name - cause trying to rename second one it gets to know that such folder already exist)

First of all you need to prepare your Excell file to contain two columns: one with actual names of folders (with path), and second - with new names of folders (with path).

To quickly add path before filename you can put path into cell in separate column and then in third column invoke formula eg. =ZŁĄCZ.TEKSTY(B1;C1).
[your nick seems to be Polish, if not - use the string/text formula to add/compound strings (probably =ADD.STRINGS, but I don't have English Excell to check)]
All you have to do then is copy the formula to the rest of cells in the column and then select the column and copy it (with /paste specially/ WSTAW SPECJALNIE) to fourth column selecting "only result/not formula" or something like that.


When you have the file ready, you need to save it as .csv (comma separated) or .txt (tab separated). I don't know why (maybe Dennis would know) but I failed to import .csv file into ReNamer, but .txt worked.
But first you have to close Excell. Otherwise you'll get an I/O error.

Open ReNamer, choose small icon Export (just above file list) and from menu choose Import file paths and new names. Load your file (.csv or .txt).
Check if everything is ok and press Rename. Voila!

ReNamer has an undo option. And it works. But I always do backup before a large renaming.
You never know.
And it may be easier to you to start from putting all these folders to one root folder, although it's not necessary. If you won't do this, you will simply have to put more paths into your .csv/.txt file.

Let us know how it worked.


Regular Expressions are not as hard to understand as you may think. Check ReNamer's manual or nice Regular Expressions tutorial for more info and start to use full power of applications that use them (like ReNamer, Mp3Tag and so on).

Offline

#3 2008-04-25 07:08

AbsolutRaj
Member
Registered: 2008-04-24
Posts: 5

Re: A huge problem, and an Excel renaming question

Thank you for your response.
The problem with the 2 excel files is that they don't both contain the same number of values.  Excel sheet 1(has folder names) contains about 3000 values, whereas Excel sheet two which has the names I want to use, has about 4500 values.

The problem is that the two columns in the sheets don't line up.  So while Sheet 1 contains all the folders I want to use Sheet 2 contains extra lines that I want to ignore.

I hope that explanation clarifies things.  I guess I still need a way to have excel sheet 1 look through excel sheet 2 and keep only the values that match, and also line them up.

Thanks again

Offline

#4 2008-04-25 08:09

krtek
Senior Member
From: Łódź (Poland)
Registered: 2008-02-21
Posts: 262

Re: A huge problem, and an Excel renaming question

Well, it doesn't clear anything wink
The cold truth about batch renaming is that you have to have pairs (old name, new name). It doesn't matter whether it is a two-column table, or old filenames and an algorythm to evaluate new ones from them. You have to feed computer with paired data.

Maybe that question will help:
How can you read from your excell sheet which filename choose from your 4500 possible new filenames to rename that particular file/folder?
Or even better - how computer can recognize that this folder should be renamed in that particular way?
If there are no connection, the list is useless.
If there is the connection, you should be able to organise the list (with minimal effort) into two column table (old name|new name).

If the connection between old name and new name is based on the old_name itself -> give examples how to evaluate one name from the other.

Last edited by krtek (2008-04-25 08:09)


Regular Expressions are not as hard to understand as you may think. Check ReNamer's manual or nice Regular Expressions tutorial for more info and start to use full power of applications that use them (like ReNamer, Mp3Tag and so on).

Offline

#5 2008-04-28 21:53

AbsolutRaj
Member
Registered: 2008-04-24
Posts: 5

Re: A huge problem, and an Excel renaming question

I used the vLookup formula to add all the correct values to a new column, and then I followed your suggestion to export to a comma separated file.
It worked beautifully. 

I renamed approx 2500 files in one go. smile

I just have to replicate and do this for a few thousand more. 

Thanks for all your help.

Offline

Board footer

Powered by FluxBB