Copy File
Posted: Sat Jun 29, 2024 10:54 pm
How we can copy / move a file using script?
Thanks! what about copy? we can use cp command right?synthsin75 wrote: ↑Sun Jun 30, 2024 12:05 am Generally, you can use os.rename to change the path of a file: https://www.gammon.com.au/scripts/doc.php?lua=os.rename
Got it, Thanks.synthsin75 wrote: ↑Sun Jun 30, 2024 8:10 pm You can either read a file and write it to a new one using the Lua IO library, or use whatever commands are available using os.execute.
The latter option would have to take into account different OS commands.