Moving multiple URLs with corresponding names into a folder.
Moving multiple URLs with corresponding names into a folder.
- Subject: Moving multiple URLs with corresponding names into a folder.
- From: iKel via AppleScript-Users <email@hidden>
- Date: Sat, 7 Mar 2020 16:35:54 -0600
Hello!
I’m working on a script to move a few URLs into a folder with
corresponding names. I have made a script where I made a script to make move
one URLs with the properties name command to a folder but was wondering if I
can iterate over a list of URLs and match a corresponding name to a specific
URL and to move them all into a folder.
set the website_names to ¬
{"AppleScriptHelp", "Introduction to AppleScript Language Guide",
"Introduction to AppleScript Overview", "Mac Automation Scripting Guide",
"About Mac Scripting", "Automator User Guide", "Add AppleScript scripts to a
workflow in Automator on Mac", "Control Automator with scripts on Mac",
"Introduction to Automator AppleScript Actions Tutorial", "The macOS Automation
Sites", "MacScripter", "CMD-D | Masters of Automation"}
set the website_URLs to ¬
{"https://help.apple.com/applescript/mac/10.9/",
"https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html#//apple_ref/doc/uid/TP4000098
3-CH208-SW1",
"https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptX/AppleScriptX.html#//apple_ref/doc/uid/10000156i",
"https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/AutomatetheUserInterface.html",
"https://support.apple.com/guide/automator/welcome/mac",
"https://support.apple.com/guide/automator/add-applescript-scripts-to-a-workflow-aut4bb6b2b4f/2.10/mac/10.15",
"https://support.apple.com/guide/automator/control-automator-with-scripts-autf238a3e24/2.10/mac/10.15",
"https://developer.apple.com/library/archive/documentation/AppleApplications/Conceptual/AutomatorTutorialAppleScript/Introduction/Introduction.html",
"https://macosxautomation.com/index.html",
"https://macscripter.net/index.php", "https://cmddconf.com/2017/videos.html”}
repeat with i from 1 to the count of the website_names
set the website_names to item i of the website_URLs
--setting the websites names to the websites URLs
exit repeat
end repeat
--moving the URLs into designated to a folder with the corresponding names
tell application "Finder"
make new internet location file ¬
to website_URLs at ¬
{"Macintosh HD:Users:iKel:Desktop:Apple Support
Links:Scripting | Automation Links:"} ¬
with properties {name:website_names}
end tell
I could be way off with my logic here or there may be a better
way to do this with a script. But if anyone has a better solution of
moving these URLs with corresponding names into a folder. I am
new to AppleScript so just trying to learn the basics here so any
help is much appreciated.
Kind regards,
Kel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden