SA-MP Forums Archive
Copy the file's content - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Copy the file's content (/showthread.php?tid=541950)



Copy the file's content - Anuris - 15.10.2014

Hello.
Guys, how can I copy the content of one .ini file to another one?
There're about 30 rows in this file.

Sorry for my English.


Re: Copy the file's content - Pottus - 15.10.2014

Use a file plugin would be your best option.

https://sampforum.blast.hk/showthread.php?tid=92246


Re: Copy the file's content - Anuris - 16.10.2014

But there're no copy all file content function..or rename file function. =(


Re: Copy the file's content - Pottus - 16.10.2014

Well he just made a mistake not listing the native there it is there look at the function documentation.


Re: Copy the file's content - Anuris - 16.10.2014

So I've done:

pawn Код:
format(string,sizeof(string),"root/scriptfiles/Files/Players/%s.ini",plnamep);
format(string2,sizeof(string2),"root/scriptfiles/Files/Players/%s.ini",changenam);
file_move(string, string2);
But the old one is still existing, but new one - don't.


Re: Copy the file's content - Jefff - 16.10.2014

pawn Код:
format(string,sizeof(string),"/Files/Players/%s.ini",plnamep);
format(string2,sizeof(string2),"/Files/Players/%s.ini",changenam);