Solved

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

Posted on 2008-06-21
4
582 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
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…

749 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