Hello Christopher,

I apologize for the delay in acknowledging your message, but I have been really 
busy here. I understand how to make AppleScripts in the AppleScript Editor. 
However I don’t quite understand you where you say "Place your folder name list 
in the variable folderNameList”.

Are you saying that I need to paste in a long list of the folder names in that 
variable? If so, do I need to separate that by commas, or spaces, or one name 
per line, or what?

Or are you saying that I need to enter a path to a BBEdit text file on my hard 
drive which contains the list of folder names?

Or do I just run the script from the “Scripts” menu with the actual folder name 
list file open in BBEdit?

Sorry, but it is just not clear to me.

Thanks!

Kind regards,

Bill



> On Jan 10, 2019, at 1:59 PM, Christopher Stone <[email protected]> 
> wrote:
> 
> On 01/09/2019, at 19:27, Bill Kochman <[email protected] 
> <mailto:[email protected]>> wrote:
>> Basically, I have a BBEdit text file with a list of about 300 folder names 
>> alphabetically listed in it, one name per line. I need a script which will 
>> take those 300 names, and create actual folders with those exact names on my 
>> hard drive in a folder on my desktop.
> 
> 
> Hey Bill,
> 
> I'm assuming you want to be able to reuse this at need, so I think a 
> self-contained script is the way to go.
> 
> Here's how to do that with AppleScript.
> 
> Place your folder name list in the variable folderNameList, run the script, 
> and go-to-town.
> 
> Save it as an AppleScript using the Applescript Editor to this folder:
> 
> ~/Library/Application Support/BBEdit/Scripts/
> 
> Run it from the script menu or give it a handy keyboard shortcut.
> 
> --
> Best Regards,
> Chris
> 
> ----------------------------------------------------------------
> # Auth: Christopher Stone
> # dCre: 2019/01/09 21:50
> # dMod: 2019/01/09 21:50 
> # Appl: Finder
> # Task: Create a new folder-set on the Desktop from a Name List.
> # Libs: None
> # Osax: None
> # Tags: @Applescript, @Script, @Finder, @Create, @Folder-set, @Set, @Desktop, 
> @Name, @List
> ----------------------------------------------------------------
> 
> try
>     
>     set desktopFolderName to "New Folder Set"
>     
>     set folderNameList to paragraphs 2 thru -2 of "
> Folder 01
> Folder 02
> Folder 03
> "
>     
>     tell application "Finder"
>         if folder desktopFolderName of desktop exists then
>             error "Folder " & desktopFolderName & "already exists on the 
> Desktop!"
>         else
>             set newFolder to (make new folder at desktop with properties 
> {name:desktopFolderName}) as alias
>             repeat with i in folderNameList
>                 make new folder at newFolder with properties {name:i}
>             end repeat
>             activate
>             reveal newFolder
>         end if
>     end tell
>     
> on error e number n
>     set e to e & return & return & "Num: " & n
>     if n ≠ -128 then
>         try
>             tell application (path to frontmost application as text) to set 
> ddButton to button returned of ¬
>                 (display dialog e with title "ERROR!" buttons {"Copy Error 
> Message", "Cancel", "OK"} ¬
>                     default button "OK" giving up after 30)
>             if ddButton = "Copy Error Message" then set the clipboard to e
>         end try
>     end if
> end try
> 
> ----------------------------------------------------------------
> 
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a 
> feature request or need technical support, please email
> "[email protected]" rather than posting to the group.
> Follow @bbedit on Twitter: <https://www.twitter.com/bbedit 
> <https://www.twitter.com/bbedit>>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/bbedit 
> <https://groups.google.com/group/bbedit>.

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or need technical support, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <https://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to