Deleting a temp file
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Deleting a temp file

Started by Shurlock, 28 May, 2004, 22:47:48

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Shurlock

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!
If it's raining and your roof leaks, fix the roof. DON'T try to stop the rain!!

VidFamne

Quoteremove (filename)
Deletes the file with the given name. If this function fails, it returns nil, plus a string describing the error.

Shurlock

QuoteOriginally posted by VidFamne
Quoteremove (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!!

SMF spam blocked by CleanTalk