Posts: 247
Threads: 70
Joined: Mar 2014
Reputation:
0
is it possible? delete a file using the command in the script
Posts: 1,355
Threads: 68
Joined: Nov 2011
Reputation:
0
-.- ...........................
YES, and wrong place
Posts: 253
Threads: 7
Joined: Sep 2013
Reputation:
0
I'm fairly sure it is possible. Yes.
Posts: 3,133
Threads: 71
Joined: Dec 2013
Reputation:
0
Yes, it is, if you even tried to use ******. I'll even re-post what the wiki says in-case you're also too lazy to click a link!
Description:
Delete a file.
Parameters:
(name[])
name[] The path of the file to delete. (NOTE: NOT a file handle)
Return Values:
1: The function executed successfully.
0: The function failed to execute. The file doesn't exist, or you don't have permission to delete it.
Important
Note
The file path must be valid.
Note
Files that are currently open (fopen) must be closed first (fclose) to be deleted.
Example Usage:
fremove("Example.txt");
Posts: 1,351
Threads: 35
Joined: Sep 2011
Reputation:
0
If you don't want to use the fremove function or the thing you want to delete is a completely different thing, you could simply script a boolean to check whether the file is active or not, if true then the code would continue, if false then it would be the replica of the file being deleted but still being there.