#1 2022-05-02 22:25

kunkel321
Member
From: Washington State
Registered: 2012-09-01
Posts: 38

From CSV to file name; best way?

Hi There.  I have about a hundred image files.  In the screenshot, you can see that the names are random strings.  I have a CSV file that has the description of the image, for each file.  What is the best way to rename them?  I figure that I can use Excel to make a column which contains the right syntax for a Translit file (then save column content as .txt).  Maybe there's an easier way though? 

Please note that several descriptions repeat, so they'd need to incriment:
disney castle amongst the clouds
disney castle amongst the clouds-1
disney castle amongst the clouds-2
etc. 

screenhot

Ideas?

Offline

#2 2022-05-02 22:40

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

Re: From CSV to file name; best way?

There are few different ways how this can be achieved.

I would probably use the "Import file paths and new names" option located in the Export menu, above the file table.

You will need to reformat your Excel file into two columns (file path and new name) and save it as a CSV file. Then, load it into ReNamer.

Offline

#3 2022-05-02 22:45

kunkel321
Member
From: Washington State
Registered: 2012-09-01
Posts: 38

Re: From CSV to file name; best way?

Actually, the Excel setup was pretty easy. 
Here is the formula, if anyone is curious...

=A1&"="&B1&IF(COUNTIF($B$1:B1,B1)=1,"","-"&COUNTIF($B$1:B1,B1))

Paste it into C1, then copy-n-paste down the column.

Your way sounds easier though.... I will try it.  Thanks!

another screenshot

Offline

#4 2022-05-02 23:22

kunkel321
Member
From: Washington State
Registered: 2012-09-01
Posts: 38

Re: From CSV to file name; best way?

The import feature was definitely easier, but I'm not sure if I'm using it correctly??
See short screencast.  "Cannot create empty directory."  Then, it crashes no matter which option I choose. Doesn't rename the files.


screencast

Win 10
ReNamer Pro 7.3

Offline

#5 2022-05-03 07:22

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

Re: From CSV to file name; best way?

@kunkel321

See https://www.den4b.com/wiki/ReNamer:Export_menu

Import file paths and new names    
>> Imports file paths and new names from the .csv (comma separated) or .txt (tab separated) file.






 


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

#6 2022-05-03 14:14

kunkel321
Member
From: Washington State
Registered: 2012-09-01
Posts: 38

Re: From CSV to file name; best way?

Ah yes -- It didn't work because I didn't include the entire path... 
Interesting though, that the preview did suggest it was going to work.

EDIT:   Would it be a good feature if ReNamer detected the absence of the path, and added it automatically??  It would definitely make my particular situation easier.

Last edited by kunkel321 (2022-05-03 16:07)

Offline

#7 2022-05-03 23:02

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

Re: From CSV to file name; best way?

The "Import file paths and new names" option requires two columns in the import file: full path and new name.

Currently, this importing function does not handle relative paths, which then results in an unhandled error during the renaming procedure, because the latter requires full paths.

So, we have two items to address:

1. Resolve relative paths at the point of import, with the base path dictated by the location of the import file.
2. Gracefully handle such errors during the renaming procedure.

Offline

#8 2022-05-05 10:20

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

Re: From CSV to file name; best way?

Stefan wrote:

@kunkel321
See https://www.den4b.com/wiki/ReNamer:Export_menu
Import file paths and new names    
>> Imports file paths and new names from the .csv (comma separated) or .txt (tab separated) file.

kunkel321 wrote:

Ah yes -- It didn't work because I didn't include the entire path...

den4b wrote:

The "Import file paths and new names" option requires two columns in the import file: full path and new name.

I have tried to make the wiki article a bit clearer to understood, IMHO.



 


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

#9 2022-05-05 20:12

kunkel321
Member
From: Washington State
Registered: 2012-09-01
Posts: 38

Re: From CSV to file name; best way?

Thanks guys.  Regarding the path, it probably makes the most sense to assume that the path for the images will be the same as the path of the imported csv file.  In my own situation (previous screencast), the files-to-be-renamed, were manually added to ReNamer.  That being the case, ReNamer should get the path from each actual file.

Offline

#10 2022-05-15 14:34

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

Re: From CSV to file name; best way?

den4b wrote:

1. Resolve relative paths at the point of import, with the base path dictated by the location of the import file.
2. Gracefully handle such errors during the renaming procedure.

Both of these items have been addressed in ReNamer 7.3.0.3 Beta.

Please try the latest development version.

Offline

Board footer

Powered by FluxBB