CobraOs

Untitled

Oct 30th, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. local FileList = fs.list("disk/") --Table with all the files and directories available
  2.  
  3. for _, file in ipairs(FileList) do --Loop. Underscore because we don't use the key, ipairs so it's in order
  4. if not fs.isDir(file) then
  5. shell.run("cp", file, "disk/"..file)
  6. print(file) --Print the file name
  7. end
  8. end
Advertisement
Add Comment
Please, Sign In to add comment