Page 1 of 1

Move only renamed files to a new specified folder.

PostPosted: Thu Feb 18, 2016 6:33 pm
by hannah141
Im renaming a large amount of images for a long established image library for a large retailer. Over time there have been all sorts of naming conventions which means I have to run BRU about 47 times :shock: to cover all bases...

With each run of renaming I'd like to remove the successfully renamed files to another folder whilst leaving the ones that didn't meet the criteria. Eventually, I'd like to be left with only anomalies.

I'm using rename from .txt file.

I've tried all options I can find on option 13 (new location) of the panel but it moves every single image over to the new specified folder instead of splitting them out.

Grateful for any help!

Re: Move only renamed files to a new specified folder.

PostPosted: Thu Feb 18, 2016 6:55 pm
by therube
Appears that 13:Copy/Move affects all selected files rather then only files that are in some (other) way renamed.
So yes, a way to filter selection: 'only renamed files' would be beneficial.

47 times

Are you able to set 12:Filter to one of those 47, then all renamed files would also be ones that you'd want to move.
Then change 12:File to the 2nd of those 47, then...

Or on renamed files, also 7:Add Prefix, something like Renamed_abc123.jpg, then come back after the fact & gather all files named, ^Renamed_ & move them to the new directory.

Re: Move only renamed files to a new specified folder.

PostPosted: Fri Feb 19, 2016 3:53 am
by Admin
It is possible to use Javascript:

Code: Select all
if (name == origName) newLocation = object("folder");


This will copy files to the new location only if some changes are needed to the name.

Re: Move only renamed files to a new specified folder.

PostPosted: Fri Feb 19, 2016 2:27 pm
by hannah141
Thanks for your help everyone.

I found a v quick way of sorting this.
In the main window after loading the .txt file, you can highlight all files and the ones meeting the criteria show as green in the rename column. You can then reorder the data set to bring all these green ones to the top. Flick to the bottom of these green codes and select from the bottom one up and only process these. So in fact, you don't process all images, only the ones that it shows you it would change. Then in (13) New location, specify your new folder and finally click rename.
Javascript wise, I'm not hugely familiar with it in the context of BRU and the IT dept weren't either. This is an easy and uncomplicated way - sometimes it just takes a step back to look at it with fresh eyes.
Thanks to BRU though, the company has saved a huge amount of time and several thousands of time on laborious data input. Thank you!

Re: Move only renamed files to a new specified folder.

PostPosted: Sat Feb 20, 2016 4:22 am
by Admin
Hi, yes, that is another way to do it! :)

Re: Move only renamed files to a new specified folder.

PostPosted: Wed Mar 02, 2016 2:28 pm
by Zenprofit
"In the main window after loading the .txt file, you can highlight all files and the ones meeting the criteria show as green in the rename column. You can then reorder the data set to bring all these green ones to the top. Flick to the bottom of these green codes and select from the bottom one up and only process these. So in fact, you don't process all images, only the ones that it shows you it would change. Then in (13) New location, specify your new folder and finally click rename."

I cannot find in the Manual how to sort by green files to the top. Please clarify. I too need to rename some, but not all folders in a directory, then move only the renamed ones to a different directory.

Thank you for an EXCELLENT utility. :idea:

Re: Move only renamed files to a new specified folder.

PostPosted: Wed Mar 02, 2016 2:35 pm
by hannah141
Hi, to reorder all the files, click on the title bar at the top, you should see them either shift all to the bottom or all to the top. You can then reorder by any of the field titles, but for this task, we want to use the first column. To see where the green ones are, highlight them all by using cntrl+A. Then select only the green ones by clicking the last green one, then press and hold shift, then click the top one. Hopefully that should work!

Re: Move only renamed files to a new specified folder.

PostPosted: Wed Mar 02, 2016 3:57 pm
by Zenprofit
Hannah141:

Thank you. That was the answer I was looking for.

Re: Move only renamed files to a new specified folder.

PostPosted: Mon Aug 27, 2018 10:24 am
by sbree
Admin wrote:It is possible to use Javascript:

Code: Select all
if (name == origName) newLocation = object("folder");


This will copy files to the new location only if some changes are needed to the name.


Hi,

Where to paste this JS? I am using the GUI based tool. Please assist.

Thanks.

Re: Move only renamed files to a new specified folder.

PostPosted: Tue Aug 28, 2018 3:44 am
by Admin
In Special (14) -> Javascript Renaming

Re: Move only renamed files to a new specified folder.

PostPosted: Tue Aug 28, 2018 10:11 am
by sbree
Admin wrote:In Special (14) -> Javascript Renaming


Ops, I was on a older version. Updated and found it but I am facing errors with sugar.js

I am on 64 bit No install version.

Re: Move only renamed files to a new specified folder.

PostPosted: Wed Aug 29, 2018 2:47 am
by Admin
Hi, the no-install version does not have sugar.js included , you can disable it in menu -> special -> javascript libraries