Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
25
Task/Create-a-file/NetRexx/create-a-file.netrexx
Normal file
25
Task/Create-a-file/NetRexx/create-a-file.netrexx
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/* 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue