Author Topic: Deleting a temp file  (Read 3026 times)

0 Members and 1 Guest are viewing this topic.

Offline Shurlock

  • Fulll Member
  • ****
  • Posts: 56
  • Karma: +1/-0
Deleting a temp file
« on: 28 May, 2004, 22:47:48 »
Hi all,


How can I delete a temp file that has been created and used to collect info for a specific user?

The file is created using 'writeto(file)'  and is no longer of value once sent to that user.
In fact, the user could re-request that info so the file should be deleted instantly after sending the content.

Hope this is clear.

Thanks for any help!
« Last Edit: 26 February, 2006, 23:51:44 by bastya_elvtars »
If it's raining and your roof leaks, fix the roof. DON'T try to stop the rain!!

PtokaX forum

Deleting a temp file
« on: 28 May, 2004, 22:47:48 »

Offline VidFamne

  • Triple Ace
  • **
  • Posts: 173
  • Karma: +2/-0
New Topic
« Reply #1 on: 28 May, 2004, 23:09:32 »
Quote
remove (filename)
Deletes the file with the given name. If this function fails, it returns nil, plus a string describing the error.

Offline Shurlock

  • Fulll Member
  • ****
  • Posts: 56
  • Karma: +1/-0
New Topic
« Reply #2 on: 28 May, 2004, 23:23:52 »
Quote
Originally posted by VidFamne
Quote
remove (filename)
Deletes the file with the given name. If this function fails, it returns nil, plus a string describing the error.


VidFamne, I am almost ashamed!  :(

Never would have thought it to be that simple!
Thanks just the same for a very quick response!

I'll be using it in the script for Freeslots (by Tezlo) to eliminate the 'Annoying Sounds' the user receives with every sentence sent.  8)

Create a list in file (yes, I know, could be table as well but have no experience with tables) and send the file, delete it and ready again for action.

Greets from Holland!
If it's raining and your roof leaks, fix the roof. DON'T try to stop the rain!!

PtokaX forum

New Topic
« Reply #2 on: 28 May, 2004, 23:23:52 »