Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript - Deleting Files

Status
Not open for further replies.

pmipalma

Programmer
Sep 25, 2006
4
NL
Working in EIS, Brio I need a command to remove files (Excel) that have been exported.

I use Command Button, have created a script but this is the missing part

Thanks for your help!
 
BrioQuery Explorer is a database pull program using ODBC connections. I used it too pull information from Lotus Notes Databases and Data Warehouses.

The script we write are in Javascript (sofar i understood, selfstudy)

I saw something like this to delete the files
myActiveXObject = new ActiveXObject("Scripting.FileSystemObject");
file = myActiveXObject.GetFile("C:\\Temp\\All Reports.htm");
file.Delete();

But this is not working

Please help
 
>file.Delete();
Try force if it is read-only.
[tt]file.Delete([blue]true[/blue]);[/tt]
Else, you might not have enough permission to delete the file.
 
Thanks for your answer

I had give this a try but still eventhough i am the administrator i cannot delete the file.

Anyone have another idea?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top