#1 2019-08-05 08:44

Luca
Member
Registered: 2019-08-05
Posts: 5

Rename Files with Excel

Hello,

I am just getting started with ReNamer, and i am not really good at programming.
Anyway I wanted to ask if there is a function or Pascalscript to rename files with the filename in Column A to the name in Column B?
Maybe there is a way without Excel?
It would really help me out, otherwise renaming over 500 Pictures would be painfully timeintensive.


Thanks for the help

Offline

#2 2019-08-05 09:19

Luca
Member
Registered: 2019-08-05
Posts: 5

Re: Rename Files with Excel

Example

Just for further clarity. The Numbers/Text in Column A should be renamed to the ones in Column B.
(Note: This is just an Example!)

Last edited by Luca (2019-08-05 09:19)

Offline

#3 2019-08-05 09:29

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Rename Files with Excel

You can save your excel file in CSV format (comma delimited), and then use ReNamer's import/export options, such as "Import file paths and new names".

Note that you will need to have a full file path in the first column, otherwise ReNamer won't know where to find the file.

Offline

#4 2019-08-05 11:51

Luca
Member
Registered: 2019-08-05
Posts: 5

Re: Rename Files with Excel

Alright i did this now, but now he gives out an error after trying to rename: The Syntax for the file name, list name or the data carrier name is false. (123).
What does this mean?
I've got the correct file path in the first column and only the new name in the second. I also tried out the path with the new names in the seocnd column, but still didn't worked.
This is how the file path looks like: Q:\[Foldername1]\[Foldername2]\010 [Foldername3]\[Foldername4]\[Foldername5]\file.jpg
And in ReNamer under "Name" stands the "010" and under "New Name" "[Foldername3]\[Foldername4]".

I hope I am not clumsy right now.^^

Last edited by Luca (2019-08-05 11:52)

Offline

#5 2019-08-05 12:42

Luca
Member
Registered: 2019-08-05
Posts: 5

Re: Rename Files with Excel

Ok I got it now. There are no spaces allowed in Folders or anything, because the indicate that there Begins the "New Name". You have to write everything in one column.

Thanks for the help^^

Offline

#6 2019-08-05 19:32

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Rename Files with Excel

If the cell contains spaces, commas or quotation marks, then the cell value must be en-quoted and inner quotation marks escaped properly.

For example:

"C:\My Folder\My Old File.txt","My New File.txt"

See this article for more examples:
https://en.wikipedia.org/wiki/Comma-sep … asic_rules

You may need to select a different variation of the CSV format when saving from Excel, to get properly en-quoted and escaped cell values.

Offline

#7 2019-08-06 11:20

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Rename Files with Excel

den4b wrote:

For example:

"C:\My Folder\My Old File.txt","My New File.txt"


How-to work with Excel or any other spreadsheet program:


1: E1 --- have your current D:\drive\path\names in column E           
2: K1 --- have the wanted new Name in column K       
   
3: A1 --- type in this formula:             ="""" & E1 & """" & ", "
4: Click on A1, see the little black square at the lower right corner,
hover your mouse until it changes to a little black cross,
click at the square
and drag it down the rows which are filled out in column E for to copy that formula.

5: B1 --- type in this formula:            ="""" & K1 & """"
6: Click on B1 and use the little black square as noted above for A/E.


7: select columns A + B
and copy&paste it to a plain text file
as CSV format (comma delimited),
and then use ReNamer's import/export options, such as "Import file paths and new names".



HTH? for an start smile

 


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#8 2019-08-13 17:37

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Rename Files with Excel

The next version of ReNamer will handle both quoted and unquoted values correctly.

Offline

#9 2019-08-26 14:24

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Rename Files with Excel

ReNamer v7.1.0.2 Beta handles unquoted values appropriately, so you don't need to manually enquote all values any more.

Offline

Board footer

Powered by FluxBB