How to resolve the algorithm Create a file step by step in the AppleScript programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Create a file step by step in the AppleScript programming language
Table of Contents
Problem Statement
In this task, the job is to create a new empty file called "output.txt" of size 0 bytes and an empty directory called "docs". This should be done twice: once "here", i.e. in the current working directory and once in the filesystem root.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Create a file step by step in the AppleScript programming language
Source code in the applescript programming language
close (open for access "output.txt")
tell application "Finder" to make new folder at startup disk with properties {name:"docs"}
tell application "Finder" to set wd to target of window 1 as string
close (open for access wd & "output.txt")
tell application "Finder" to make new folder at window 1 with properties {name:"docs"}
You may also check:How to resolve the algorithm Giuga numbers step by step in the Euler programming language
You may also check:How to resolve the algorithm Find the missing permutation step by step in the MATLAB programming language
You may also check:How to resolve the algorithm Hello world/Text step by step in the TI-57 programming language
You may also check:How to resolve the algorithm Guess the number/With feedback (player) step by step in the Icon and Unicon programming language
You may also check:How to resolve the algorithm Longest common substring step by step in the J programming language