![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I want to delete a folder on a network drive through jscript. I have tried everything and I can't delete and folders on that drive. I have tried the fileSystem object and WScript.Shell. Nothing will erase it. the folders exists and my paths are correct but I cant delete. Using windows explorer, I can delete with no problem. Using DOS, no problem. Using VB6 with FSO or WinAPI's, no problem again. But when I try any of these methods from jscript it wont erase. It says path not found. But that doesnt make sense because I check to see if the folderexists first, and it returns true! I even wrote an exe in VB6 to erase it, and it works great from windows. BUT when i shell to the exe in jscript, it fails! I have shown the "My Computer Zone" in Internet Explorer, and enabled as much stuff as I thought needed. I am stupmed. My only guess is when I run things through explorer, I have a different set of user rights, than when I run things from the browser. |
|
Any Ideas?!? |
#3
| |||
| |||
|
|
wrote in news:1154220313.303954.324470 (AT) m73g2000cwd (DOT) googlegroups.com in alt.comp.lang.javascript: I want to delete a folder on a network drive through jscript. I have tried everything and I can't delete and folders on that drive. I have tried the fileSystem object and WScript.Shell. Nothing will erase it. the folders exists and my paths are correct but I cant delete. Using windows explorer, I can delete with no problem. Using DOS, no problem. Using VB6 with FSO or WinAPI's, no problem again. But when I try any of these methods from jscript it wont erase. It says path not found. But that doesnt make sense because I check to see if the folderexists first, and it returns true! I even wrote an exe in VB6 to erase it, and it works great from windows. BUT when i shell to the exe in jscript, it fails! I have shown the "My Computer Zone" in Internet Explorer, and enabled as much stuff as I thought needed. I am stupmed. My only guess is when I run things through explorer, I have a different set of user rights, than when I run things from the browser. Absolutly, when you run a .js file by clicking in explorer it just calls wscript.exe to run the script, it has nothing to do with IE or your internet security settings. You should reset those settings. Any Ideas?!? More of a wild guess realy. Are you doubling the backslashes \'s ?, i.e: var folder_to_delete = "\\\\ShareName\\folder\\folder"; Rob. -- http://www.victim-prime.dsl.pipex.com/ |
#4
| |||
| |||
|
|
Rob Williscroft wrote: wrote in news:1154220313.303954.324470 (AT) m73g2000cwd (DOT) googlegroups.com in alt.comp.lang.javascript: I want to delete a folder on a network drive through jscript. I Any Ideas?!? More of a wild guess realy. Are you doubling the backslashes \'s ?, i.e: var folder_to_delete = "\\\\ShareName\\folder\\folder"; Rob. -- http://www.victim-prime.dsl.pipex.com/ Thanks for the responce rob I did try to double the slashes.. with no luck I am not using a UNC path I am using a network drive Z:\temp for ezample would this change anything? |
![]() |
| Thread Tools | |
| Display Modes | |
| |