Removing text from a folder or file name

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Removing text from a folder or file name Sun Nov 04, 2018 2:07 pm • by garry4
Apple photos export creates folder names like this:
Baltimore - Charles Village - Saint Paul St, April 25, 2018

I’ve figured out how to prefix the date in a more useable format:
2018-04-25 Baltimore - Charles Village - Saint Paul St, April 25, 2018

I can’t figure out how to trim the date off of the end. I tried to create a custom toke that captures text up to the first comma but no luck.
garry4
 
Posts: 9
Joined: Sat Aug 23, 2014 11:29 am

Re: Removing text from a folder or file name Mon Nov 05, 2018 12:16 pm • by Mr_Noodle
Can you post the pattern you are using?
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Removing text from a folder or file name Mon Nov 05, 2018 7:58 pm • by garry4

Re: Removing text from a folder or file name Tue Nov 06, 2018 11:13 am • by Mr_Noodle
None of those links are working. Can you repost?
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Removing text from a folder or file name Sun Nov 11, 2018 11:37 am • by garry4
Rule
https://image.ibb.co/mwWPVA/Screen-Shot-2018-11-10-at-10-31-00-AM.png

Creates a variable with the spelled out month day year.
https://image.ibb.co/kRRrAA/Screen-Shot-2018-11-10-at-10-32-37-AM.png

Trying to create a variable that holds the name of the folder up to the point of the first comma , in the folder name.
https://image.ibb.co/eXGrAA/Screen-Shot-2018-11-10-at-10-33-37-AM.png

Convert the spelled out name variable to YYYY/MM/DD format. Place it in front of the variable of the folder name.
https://image.ibb.co/h0dSiV/Screen-Shot-2018-11-10-at-10-34-30-AM.png
garry4
 
Posts: 9
Joined: Sat Aug 23, 2014 11:29 am

Re: Removing text from a folder or file name Mon Nov 12, 2018 12:45 pm • by Mr_Noodle
You don't want to grab the whole name, as that includes the date at the end. In the first pattern, instead of "...", create a custom attribute which matches "...". That way, it will contain everything up the the date, which you can then use in the Rename pattern.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron