How to resolve the algorithm Create a file step by step in the REXX programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Create a file step by step in the REXX 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 REXX programming language
Source code in the rexx programming language
/*REXX pgm creates a new empty file and directory; in curr dir and root.*/
do 2 /*perform three statements twice.*/
'COPY NUL output.txt' /*copy a "null" (empty) file. */
'MKDIR DOCS' /*make a directory (aka: folder).*/
'CD \' /*change currect dir to the root.*/
end /*2*/ /*now, go and perform them again.*/
/*stick a fork in it, we're done.*/
You may also check:How to resolve the algorithm Gauss-Jordan matrix inversion step by step in the zkl programming language
You may also check:How to resolve the algorithm Damm algorithm step by step in the Arturo programming language
You may also check:How to resolve the algorithm Euler's constant 0.5772... step by step in the Sidef programming language
You may also check:How to resolve the algorithm Summarize primes step by step in the Julia programming language
You may also check:How to resolve the algorithm Roots of unity step by step in the REXX programming language