I’m have a task it write a Utility in AppleScript, the Utility had to do a of File and Folder operations (copy file to folder, copy folder (and contents) to folder, delete file/folder, get all items of a folder, etc.). It needs to use POSIX paths wherever possible, since I will be processing list of POSIX paths (already in existence). Is there a library available to help with this?
Also, I’d like to give the App a Simple GUI (just a window with buttons, text boxes, menus, Scrolling Lists) is there a library available that does this? If this is not possible, then I’ll need to make a number of scripts to handle the main functions of the Utility, but I’d rather just have one script with a GUI if possible.
Thanks a lot, I’ve downloaded it, I’m checking out how it works now. Once thing does the library HAVE to be installed in Scripting Additions or can I just have a copy local to my script?
The library must be installed in " ~/Library/Script Libraries" or in “/Library/Script Libraries”
If my memory is right, you may also install them in your script, assuming that it’s a package or an application, in the folder
“myScript:Contents:Resources:Library:”
Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) mercredi 29 avril 2020 09:48:06
on objects of aFileOrPath searching subfolders recurseFlag : false include invisible items incInvis : false include folders incFolders : true include files incFiles : true result type resType : paths list
What is the syntax for using it? I’ve tried all manner of combo’s but can’t seem to get it right!
I’m not really surprised because it’s not really self-explanatory.
use AppleScript version "2.5"
use framework "Foundation"
use scripting additions
use script "FileManagerLib" version "2.3.4"
set aFileOrPath to choose folder
-- search in subfolders returning only the folders
objects of aFileOrPath result type paths list with searching subfolders without include files and include invisible items
-- or
objects of aFileOrPath result type paths list with searching subfolders and include folders without include invisible items
-- search in subfolders returning only the files
objects of aFileOrPath result type paths list with searching subfolders without include folders and include invisible items
--or
objects of aFileOrPath result type paths list with searching subfolders and include files without include invisible items
Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) mercredi 29 avril 2020 14:09:23