Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to delete Server files/folders from LAN user (JavaScript)

Posted on 2008-06-21
4
Medium Priority
?
587 Views
Last Modified: 2008-07-04
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.
0
Comment
Question by:nyoka
  • 3
4 Comments
 
LVL 7

Expert Comment

by:kGenius
ID: 21837413
what's the exact error?
Karl
0
 

Author Comment

by:nyoka
ID: 21837456
Regret, unknown.  However line number refers to the above code.   Will only be able to check on Monday.  "Permission denied" is probable.
Keith
0
 

Author Comment

by:nyoka
ID: 21844632
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?
0
 

Accepted Solution

by:
nyoka earned 0 total points
ID: 21880931
Karl,  No reply from you.

Anyway, after much experimentation, an XP/Windows 2003 server bug was found:  Cannot change read-only settings on files, using Windows Explorer.  One can set them once, and then they revert to Read-only.  Using the "Start-up, Run, Cmd, attrib -r +s path\folder" routine enabled permanent Read-only Clear on the required folders on User & Server.  Problem solved.

Refer Microsoft support article No 326549, which provides a work-around.  They admit nothing - say this behaviour is by design.  However, they appear to have eliminated the problem in the two versions of Vista I tested!

Suggest this thread be closed.  Awarding of points does not seem appropriate in this case.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question