0

I'm having an issue trying to get applescript to locate a file with random characters in it. I'm able to get to where the folder is located, but how do I find that folder? Here is my scenario:

1) folder is always going to have .default in the end of the folder. 2) The first part of the folder name is randomly generated characters.

Here is my code so far.

    set FolderPath to ((path to home folder as text) & "Library:Application Support:Firefox:Profiles")

    tell application "Finder" to get every folder of folder FolderPath

For those who are interested, I'm trying to modify the pref.js file inside of the default folder of FireFox.

Currently on my machine the folder has this file name: tsv5su2x.default

1 Answer 1

1

Try:

tell application "Finder" to set myFolders to folders of folder FolderPath whose name extension = "default"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.