nyoka
asked on
How to delete Server files/folders from LAN user (JavaScript)
Prgram runs successfully, using user disk partition as server emulation. When LAN connected, files/folders are sucessfully copied to sever. However, the following code returns an error when interacting with server (but not with files on user PC):
GLOBALS:
gpath=''; // this is given value prior to calling "DeleteFile()
fso = new ActiveXObject("Scripting.F ileSystemO bject");
function DeleteFile() {
if (fso.FileExists(gpath)) {var afile = fso.GetFile(gpath); afile.Delete();}
}
Even when full administrator rights are given, the error still occurs.
Your input will be valued.
GLOBALS:
gpath=''; // this is given value prior to calling "DeleteFile()
fso = new ActiveXObject("Scripting.F
function DeleteFile() {
if (fso.FileExists(gpath)) {var afile = fso.GetFile(gpath); afile.Delete();}
}
Even when full administrator rights are given, the error still occurs.
Your input will be valued.
ASKER
Regret, unknown. However line number refers to the above code. Will only be able to check on Monday. "Permission denied" is probable.
Keith
Keith
ASKER
Karl, Tested using Kingston flash disk in user PC, acting as server drive. With Vista Home Basic and Vista Home premium, IE7, all works OK. With XP SP2, fails: "could not read the size property". Retry="permission denied". Inspection with Windows Explorer shows file not deleted from Kingston. Seems to be XP-related. XP IE 6 Intranet & Local set to 'Low'.
Are there any XP tweaks one requires?
Are there any XP tweaks one requires?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Karl