PtokaX forum

Development Section => Your Developing Problems => Topic started by: didpoy on 17 July, 2007, 11:09:03

Title: How to copy file in another directory ?
Post by: didpoy on 17 July, 2007, 11:09:03
Hello
(Sorry my English is not perfect ...)

Lua 5.x

How to copy files to another directory ??

Example:
Copy c:\fichier.txt to c:\backup\fichier.txt

I know the command: rename ("","") but copy ???

Thank for your Help

Bye
Title: Re: How to copy file in another directory ?
Post by: bastya_elvtars on 17 July, 2007, 11:17:00
Either run the copy Windows command, or open the file and save its contents into another location.
Title: Re: How to copy file in another directory ?
Post by: didpoy on 17 July, 2007, 13:27:23
re

Not, I would like to do it via an order script lua 5.x for Ptokax?!!!

thank
Title: Re: How to copy file in another directory ?
Post by: bastya_elvtars on 17 July, 2007, 13:31:03
You can run the copy command via os.execute(), the only pitfall is a dos window popup. You have to do the other way if this is unacceptable.
Title: Re: How to copy file in another directory ?
Post by: didpoy on 17 July, 2007, 16:12:01
re

Thank's for your reponse..

It's good

Bye
Title: Re: How to copy file in another directory ?
Post by: didpoy on 18 July, 2007, 00:07:43
Thank you for this lua source?

Here is good work which will be quite useful for me?

Thank you So long

bye