Hello. How to write this command correctly on a Macbook, in the script editor, so that I can click the "Run script" button and the script will give the result:
- if there is no folder, then report that there is no folder,
- if there is a folder, then report that the folder exists.
do shell script "test -d 'Users/user/Desktop/New folder'"
Now, if the folder exists, an empty string ("") is returned, if the folder does not exist, the script editor reports that an error has occurred.
In general, my task is to write a script that checks the existence of a folder.