Load directories via CSV

Advanced Renamer forum
#1 : 28/02-19 07:14
Sam
Sam
Posts: 3
Hi,

I have files I need to assess and rename in approximately 7000 folders. I can Identify the folders but don't know how to populate them into the pane in an efficient manner. I am happy to do batches but not one by one :)

Thanks in advance.


28/02-19 07:14
#2 : 28/02-19 14:16
L B
L B
Posts: 74
Reply to #1:

Just add the root folder wherein all these other folders are located and select "Add subfolders". Or you can pattern match and load selective folders. For this, click on"Add" under Rename Files tab, then select the root folder and enter the mask. For more details, please read the User Guide.


28/02-19 14:16
#3 : 01/03-19 01:51
Sam
Sam
Posts: 3
Reply to #2:
Thanks for the quick reply,

I have possibly 20X the amount of folders in the directory than what I need to assess, so I can't add all subfolders.

In relation to the masking I have tried several ways to add them to no avail, I looked through the user guide as well.

If you could include an example of the syntax required that would be great.

To be clear the data I am searching on is folder names not file names as these can be varied.

Thanks again.


01/03-19 01:51
#4 : 01/03-19 21:42
David Lee
David Lee
Posts: 1125
Reply to #3:

Unless I'm missing something I don't believe that A.Ren supports selective import by pattern matching folders. Neither can you use "Import files from CSV..." to import filenames from a list of folders.

My suggestion would be to import files from all your folders (or as large as possible a subset) and then rename files in selected folders using a script.

You can obtain the folder name for the current filename using: app.parseTags("<DirName>")
then rename the file if this string satisfies whatever criteria you define.

In principle it should be pretty straightforward - but you may need to do a bit of research on the web to work out how to apply Regular Expressions in JavaScript to perform the matching.


01/03-19 21:42 - edited 01/03-19 21:43
#5 : 02/03-19 02:10
L B
L B
Posts: 74
Reply to #4:

I remembered having loaded files from selective folders using RegEx pattern matching. But this was a long time ago, so I don't remember the specifics, and I only needed to do it that once.

But yeah, it would be more practical, although it sounds impractical, to just load all the files from all the folders and rename them using RegEx patterns using multiple Replace methods.


02/03-19 02:10
#6 : 02/03-19 15:09
David Lee
David Lee
Posts: 1125
Reply to #5:

L B:

It would be useful if you could post as much as you can remember.

As far as I can see "Mask:" and "Regular expression match:" in the "Add Directory" dialogue only apply to FILENAMES. I can't find any way of using them to select specific FOLDERS or sub-folders.

Are you sure that you used pattern matching on FOLDER names?

It would be really handy if you could prove me wrong!

Also I don't think that the Replace method will allow you to rename files only in specific FOLDERS. Hence my suggestion of using a script to import the folder name as a string using app.parseTags("<DirName>"), which you can then search using RegEx.

Again it would be nice to be proved wrong! ;-)


02/03-19 15:09 - edited 02/03-19 15:17
#7 : 04/03-19 04:09
Sam
Sam
Posts: 3
Reply to #6:
What I ended up doing was importing everything exporting a list, manipulating the list (using excel) for the files I wanted to rename and importing the new list.

Was fairly straightforward although would have been nicer to use the tool to do it.

Regards.


04/03-19 04:09