UBB.Dev
Posted By: Menno Trying to write a routine.... - 03/25/2000 3:51 PM
Ok, I've been modifying the ugb a bit lately [Linked Image]

Now, I want to make a routine (in the control panel) that would make a backup of entries.file (as oldentries.file) and clear entries.file itseld (or delete it)

Now, how do I make this routine? [Linked Image]

------------------
Cougar's here, so have no fear
Webmaster of www.artbeast.de
Posted By: cal Re: Trying to write a routine.... - 03/25/2000 4:07 PM
To delete a file use:
Code
code:

To rename a file use:
Code
code:

Just a thought [Linked Image]
Posted By: ilya Re: Trying to write a routine.... - 03/25/2000 11:19 PM
Here's how to do it to clear file:
Code
code:

------------------
Thanks for reading!
Ilya
Administrator of Ubb Code Hackers Hideout
Moderator of UBB Hacks Finished
Posted By: Menno Re: Trying to write a routine.... - 03/26/2000 10:50 AM
thanks guys

------------------
Cougar's here, so have no fear
Webmaster of www.artbeast.de
Posted By: cal Re: Trying to write a routine.... - 03/26/2000 2:48 PM
Anytime - this forum is getting a bit stale. No one really asks perl questions.

Just a thought [Linked Image]
Posted By: Menno Re: Trying to write a routine.... - 03/26/2000 6:01 PM
Well, that routine worked perfect, but now I want a little twist [Linked Image]
I still want the routine to make a backup, but instead of emptying intries.file, it should be deleted entirly
Posted By: cal Re: Trying to write a routine.... - 03/26/2000 6:57 PM
Er - renaming it would have this affect.

Just a thought [Linked Image]
Posted By: ilya Re: Trying to write a routine.... - 03/26/2000 10:40 PM
Change this
open(ENT,">$path/to/entries.file");print ENT "n";close(ENT);
to
unlink "entries.file"

------------------
Thanks for reading!
Ilya
Administrator of Ubb Code Hackers Hideout
Moderator of UBB Hacks Finished
© UBB.Developers