Question
FMS2 - File object - no remove() possible
Hi all,
I've created a logging system on FMS2 server-side. Every log will be stored in an text file. So far so good, I can create files, write to the files, appand to the files.
Then I loop trought all the files (I can get a nice array off all the files in the log directory), send the info from the file to ASP, and when I get an loadVars success I want to remove the log-file.
So I create a remove function:
[script]
var removeFileObject = new File(fileToRemove);
if(removeFileObject.exists){
trace("file exists: "+removeFileObject.name);
if(removeFileObject.remove()){
trace("success removing file");
}else{
trace("error removing file");
}
}
[/script]
while tracing on the server console it says:
file exists: /logs/1145856681671.log
Sending error message: E:\Program Files\Macromedia\Flash Media Server 2\applications\movies\main.asc: line 104: File operation remove failed.
error removing file
I've been tryin for hours now and getting to the point off throwing my pc through the window 😉 If you ask me it hase to be buggy, i've no idea anymore, i also set full everyone rights to the directories but no success....
Anyone having the same problems, maybe a solution....?
thanx in advance people!
I've created a logging system on FMS2 server-side. Every log will be stored in an text file. So far so good, I can create files, write to the files, appand to the files.
Then I loop trought all the files (I can get a nice array off all the files in the log directory), send the info from the file to ASP, and when I get an loadVars success I want to remove the log-file.
So I create a remove function:
[script]
var removeFileObject = new File(fileToRemove);
if(removeFileObject.exists){
trace("file exists: "+removeFileObject.name);
if(removeFileObject.remove()){
trace("success removing file");
}else{
trace("error removing file");
}
}
[/script]
while tracing on the server console it says:
file exists: /logs/1145856681671.log
Sending error message: E:\Program Files\Macromedia\Flash Media Server 2\applications\movies\main.asc: line 104: File operation remove failed.
error removing file
I've been tryin for hours now and getting to the point off throwing my pc through the window 😉 If you ask me it hase to be buggy, i've no idea anymore, i also set full everyone rights to the directories but no success....
Anyone having the same problems, maybe a solution....?
thanx in advance people!
