Link to home
Start Free TrialLog in
Avatar of nyoka
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.FileSystemObject");
 
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.
Avatar of kGenius
kGenius
Flag of Belgium image

what's the exact error?
Karl
Avatar of nyoka
nyoka

ASKER

Regret, unknown.  However line number refers to the above code.   Will only be able to check on Monday.  "Permission denied" is probable.
Keith
Avatar of nyoka

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?
ASKER CERTIFIED SOLUTION
Avatar of nyoka
nyoka

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial