Help | change file name - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help | change file name (
/showthread.php?tid=124168)
Help | change file name -
Daniel13145 - 29.01.2010
hello,
if i have file with name
bla.txt at scriptfiles and i want to change his name to
hello.txt.
how i doing that?
some one tell me to do
frename or somthing like that but its not work
Re: Help | change file name -
Doppeyy - 29.01.2010
Just right click it and pick change name ?
[Doppeyy
Re: Help | change file name -
Daniel13145 - 29.01.2010
i have register system and i want to do /changenick
Re: Help | change file name -
Doppeyy - 29.01.2010
Quote:
Originally Posted by Daniel13145
i have register system and i want to do /changenick
|
Well then you should have told that aswell.
The only thing you sayd is that you want to change the name.
Edit : do you have something already ? or do you want someone to make it for you ?
[Doppeyy
Re: Help | change file name -
Daniel13145 - 30.01.2010
i told i have this command
i tried to do frename(filename, tofilename);
but frename dosn't work
so.. i find new one. :\ so.. help me :]
Re: Help | change file name -
ray187 - 30.01.2010
Show the lines of /changename.
Re: Help | change file name -
MadeMan - 30.01.2010
Example: frename("bla.txt", "hello.txt");
pawn Код:
stock frename(oldname[], newname[])
{
if (!fexist(oldname)) return 0;
new File:oldfile = fopen(oldname, io_read);
new File:newfile = fopen(newname, io_write);
new line[256];
while (fread(oldfile, line))
{
fwrite(newfile, line);
}
fclose(oldfile);
fclose(newfile);
fremove(oldname);
return 1;
}