Help | change file name
#1

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
Reply
#2

Just right click it and pick change name ?

[Doppeyy
Reply
#3

i have register system and i want to do /changenick
Reply
#4

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
Reply
#5

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 :]
Reply
#6

Show the lines of /changename.
Reply
#7

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)