RosettaCodeData/Task/Rename-a-file/Yabasic/rename-a-file.basic
2023-07-01 13:44:08 -04:00

10 lines
291 B
Text

if peek$("os") = "windows" then
slash$ = "\\" : com$ = "ren "
else
slash$ = "/" : com$ = "mv "
end if
system(com$ + "input.txt output.txt")
system(com$ + "docs mydocs")
system(com$ + slash$ + "input.txt " + slash$ + "output.txt")
system(com$ + slash$ + "docs " + slash$ + "mydocs")