Search and Replace Sub Folders Name

Post Reply
Charltonpaul
Newbie
Posts: 14
Joined: Mon Feb 27, 2023 12:44 pm

Search and Replace Sub Folders Name

Post by Charltonpaul »

Is it possible to search for a sub folder name and then replace the folder name with something else?
I can get it to work for the folder at the top but not any other folders.
rhd_ole
Member
Posts: 149
Joined: Mon Jan 24, 2022 5:36 pm

Re: Search and Replace Sub Folders Name

Post by rhd_ole »

You could use the inject job or inject wildcard apps to get the folder into Switch. Once you inject the folder, rename and place it back using the hierarchy.
Color Science & Workflow Automation
User avatar
PrepressNinja
Newbie
Posts: 8
Joined: Fri Feb 16, 2018 5:46 pm

Re: Search and Replace Sub Folders Name

Post by PrepressNinja »

If I understand you correctly, Job.NestedName will return the sub directories in your top-level folder, which you can then target for further processing.
▬▬ι═══════ﺤ
Charltonpaul
Newbie
Posts: 14
Joined: Mon Feb 27, 2023 12:44 pm

Re: Search and Replace Sub Folders Name

Post by Charltonpaul »

Screenshot attached. Basically the flow retains the existing folders. The folder "supplied" is constant every time and never changes, the other folders are different each time.

I would like to change the folder supplied to another name.

Hope this make sense
Attachments
Folder.png
Folder.png (114.34 KiB) Viewed 9135 times
rhd_ole
Member
Posts: 149
Joined: Mon Jan 24, 2022 5:36 pm

Re: Search and Replace Sub Folders Name

Post by rhd_ole »

Charltonpaul wrote: Mon Aug 19, 2024 5:36 pm Screenshot attached. Basically the flow retains the existing folders. The folder "supplied" is constant every time and never changes, the other folders are different each time.

I would like to change the folder supplied to another name.

Hope this make sense
I'm assuming you have the job number as privatedata? the 602571? If so use inject, set is a a repository, set the path to the root of the job number folder.
eg: /Volumes/JobServerName/[Job.PrivateData:Key="job_number"]

Job Name would be 'supplied'

Then in the Name job after you can use Custom and change it on the inject or once in switch you can use a rename also.

You would also need to set the 'Delete after injection' to Yes.

Here is the result, the first is injecting and not renaming it via the inject, second is the rename using the inject. From here you would jsut need to put it back to the location is belongs to on the server.
Screenshot 2024-08-19 at 10.50.52 AM copy.jpg
Screenshot 2024-08-19 at 10.50.52 AM copy.jpg (136.18 KiB) Viewed 9131 times

Another completely different method would be to use a script via Execute Command or Run Command, that searches for the job number then to the 'supplied' folder and renames it without inputing any of the files into switch.
Color Science & Workflow Automation
Post Reply