Welcome Guest

Pages: 1
Read Text File "Read File" path/match question (again)
noforkerPostApril 28, 2020, 01:07
Newbie
Posts: 17
Registered:
July 25, 2016, 01:03
Normal topicRead Text File "Read File" path/match question (again)

I have a text file that is generated by Shortcuts on my iPad or iPhone when sharing a link from a YouTube video to the Shortcut. It adds a text file named in this format in iCloud.

YYYY-MM-DD - Title - Credits.txt

I then move this text file from iCloud to the folder where the audio files that I'm working on are stored. This text file includes musician and involved people credits scraped from the respective YouTube video description. However, for my action to work, I always have to rename the text file simply "Credits.txt" as have the Read File field set to the following.

\!Original Path to Folder!/Credits.txt

Is there a way to add functions where I can find that file that ends with "Credits.txt" so that I don't have to remember to rename this file every time?

Thank you for your help, as always!
Neil

2MR2PostApril 28, 2020, 07:54
Avatar photo
Administrator
Posts: 2083
Registered:
August 23, 2012, 19:27
Normal topicRe: Read Text File "Read File" path/match question (again)

There is 🙂

Basically you extract a list of files in the folder and look for one ending in 'credits.txt'.

I've uploaded an action named Read Credits Text File to:

https://2manyrobots.com/actions/ReadCreditsTextFile.zip

Call the action from one of yours. When it returns the action test state will be true and named variable contents will contain the read file. If the action test state was false there was not exactly one matching file or there was a read error.

Pages: 1
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.016 seconds.