26 lines
795 B
Plaintext
26 lines
795 B
Plaintext
/* NetRexx */
|
|
options replace format comments java crossref symbols nobinary
|
|
|
|
fName = ''; fName[0] = 2; fName[1] = '.' || File.separator || 'output.txt'; fName[2] = File.separator || 'output.txt'
|
|
dName = ''; dName[0] = 2; dName[1] = '.' || File.separator || 'docs'; dName[2] = File.separator || 'docs'
|
|
|
|
do
|
|
loop i_ = 1 to fName[0]
|
|
say fName[i_]
|
|
fc = File(fName[i_]).createNewFile()
|
|
if fc then say 'File' fName[i_] 'created successfully.'
|
|
else say 'File' fName[i_] 'aleady exists.'
|
|
end i_
|
|
|
|
loop i_ = 1 to dName[0]
|
|
say dName[i_]
|
|
dc = File(dName[i_]).mkdir()
|
|
if dc then say 'Directory' dName[i_] 'created successfully.'
|
|
else say 'Directory' dName[i_] 'aleady exists.'
|
|
end i_
|
|
catch iox = IOException
|
|
iox.printStackTrace
|
|
end
|
|
|
|
return
|