[AJUDA] Renomear arquivo
#5

Quote:
Originally Posted by [S]trong
Посмотреть сообщение
pawn Код:
frename(oldfile [], newfile []) // by [S]trong
{
    if (!fexist(oldfile))
    {
        return print("Error: Could file not found!");
    }

    new String [256],
        File: oldarchive = fopen(oldfile, io_read),
        File: newarchive = fopen(newfile, io_write);

    while (fread(oldarchive, String))
    {
        fwrite(newarchive, String);
    }
   
    fclose(newarchive);
    fclose(oldarchive);

    return fremove(oldfile);
}
Ai eu uso assim?:

pawn Код:
frename(diretorio,tmp); //exemplo..
Reply


Messages In This Thread
[AJUDA] Renomear arquivo - by Kan - 29.12.2011, 20:42
Re: [AJUDA] Renomear arquivo - by Kuddy - 29.12.2011, 20:45
Re: [AJUDA] Renomear arquivo - by Kan - 29.12.2011, 20:47
Re: [AJUDA] Renomear arquivo - by [S]trong - 29.12.2011, 20:48
Re: [AJUDA] Renomear arquivo - by Kan - 29.12.2011, 21:06
Re: [AJUDA] Renomear arquivo - by [S]trong - 29.12.2011, 21:08

Forum Jump:


Users browsing this thread: 1 Guest(s)