Hi everyone
I've played around with scripting and renaming as well as browsing this forum and still can't quite figure out how you would batch rename with values taken from columns.
For example, let's say I have jpgs of dogs and the image files all have random names. Now I would like to give them all a name with information taken from columns, consisting of the value entered in the column "age", "color", "breed", and "gender". In the end, the names should look something like this "09_brown_GermanShepherd_f.jpg".
I'm sure that XYplorer could handle such an easy thing and I'm just too noob to figure it out. Does anyone have a tip on how to approach this task?
Batch rename with values from columns
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Batch rename with values from columns
Would you mind telling us which columns you've actually used? Extra1, Extra2, Extra<x>?
Code: Select all
$age = tagitems("ex1");
$color = tagitems("ex2");
$breed = tagitems("ex3");
$gender = tagitems("ex4");
$newName = trim($age . "_" . $color . "_" . $breed . "_" . $gender, "_");
if ($newName) { renameitem($newName); }
One of my scripts helped you out? Please donate via Paypal
-
n00bs
- Posts: 7
- Joined: 05 Sep 2022 09:27
Re: Batch rename with values from columns
yes. of course! It's extra5, extra6 and extra7
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Batch rename with values from columns
Then replace the ex1, ex2, etc. with your values and you're done
One of my scripts helped you out? Please donate via Paypal
-
n00bs
- Posts: 7
- Joined: 05 Sep 2022 09:27
Re: Batch rename with values from columns
works like a charm, thank you very much!
XYplorer Beta Club