473,387 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

FileSystemObject DeleteFolder Permission Denied

Dear all,

I have a script that creates a FileSystemObject to be used for
folder/directory manipulation. What I am trying to do is to search the
drive if folder exist. If it doesn't it creates a new folder, but if
the folder exists it deletes the old folder and creates a new one. The
error refers to the line where I am deleting the folder. Here is my
code:

zip_path = "C:\cd_build"

If fso.FolderExists (zip_path & "\to_Zip") Then
error line -> fso.DeleteFolder (zip_path & "\to_Zip" )
fso.CreateFolder (zip_path & "\to_Zip" )
else
fso.CreateFolder (zip_path & "\to_Zip" )
end if

And this is the error I am getting:

Microsoft VBScript runtime error '800a0046'

Permission denied

I have all the rights (full control) to the folder.

If I am trying to delete the folder in the Windows Explorer it gives
me and error for Sharing Violation. This foder is not used by any
other program, open anywhere else or anything.
I have no idea what is going on!!

Please somebody help me.

Thanks
Katja
Jul 19 '05 #1
4 13029
Is this folder shared?

Ray at work

"Katja" <ka**********@hotmail.com> wrote in message
news:a2**************************@posting.google.c om...
zip_path = "C:\cd_build"

If fso.FolderExists (zip_path & "\to_Zip") Then
error line -> fso.DeleteFolder (zip_path & "\to_Zip" ) I have all the rights (full control) to the folder.

If I am trying to delete the folder in the Windows Explorer it gives
me and error for Sharing Violation.

Jul 19 '05 #2
Hi Ray,
Yep, the folder is shared.
I tried to close the sessions and stuff as if it was thinking that the
folder was in use but still no joy.
Any other thoughts?

Katja

"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message news:<OE**************@TK2MSFTNGP11.phx.gbl>...
Is this folder shared?

Ray at work

"Katja" <ka**********@hotmail.com> wrote in message
news:a2**************************@posting.google.c om...
zip_path = "C:\cd_build"

If fso.FolderExists (zip_path & "\to_Zip") Then
error line -> fso.DeleteFolder (zip_path & "\to_Zip" )

I have all the rights (full control) to the folder.

If I am trying to delete the folder in the Windows Explorer it gives
me and error for Sharing Violation.

Jul 19 '05 #3
Delete the share?

Ray at work
"Katja" <ka**********@hotmail.com> wrote in message
news:a2**************************@posting.google.c om...
Hi Ray,
Yep, the folder is shared.
I tried to close the sessions and stuff as if it was thinking that the
folder was in use but still no joy.
Any other thoughts?

Katja

"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message

news:<OE**************@TK2MSFTNGP11.phx.gbl>...
Is this folder shared?

Ray at work

"Katja" <ka**********@hotmail.com> wrote in message
news:a2**************************@posting.google.c om...
zip_path = "C:\cd_build"

If fso.FolderExists (zip_path & "\to_Zip") Then
error line -> fso.DeleteFolder (zip_path & "\to_Zip" )

I have all the rights (full control) to the folder.

If I am trying to delete the folder in the Windows Explorer it gives
me and error for Sharing Violation.

Jul 19 '05 #4
Hi Ray,
Thanks for your reply but it didn't work either. The folder needs to
be shared so that user has read and write access to it.
I think the system somehow thinks that the folder is in use even it is
not.
The user did download the content of the folder just few secs earlier
so maybe there is a way to tell it that it has finished downloading
and then it would allow it to be deleted.

Any thoughts?

Thanks,
Katja
Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mark | last post by:
I'm having intermittent trouble with the Scripting.FileSystemObject. Basically, I'm stress testing my ASP application and using the FSO to output lots of instrumentation/debug information to the...
1
by: Scott MacLean | last post by:
I'm pulling my hair out over this one. I've got a web page that I need to have write to another server across the network. The site in question does NOT run in anonymous mode, that is, the user is...
0
by: bart plessers | last post by:
Hello, I want to list my folders with ASP. I use following script to achieve this: Set oFSO = Server.CreateObject("Scripting.FileSystemObject") Set oRoot = oFSO.GetFolder(Path) Set oFolders =...
4
by: Vilmar Brazão de Oliveira | last post by:
Hi, I got the err below, nevertheless my folders have full permissions for all. Permission denied /vilmar/ASP_JavaScript_CSS_HTML/ajudas_asp_completos/novo_asp/novo_asp_4-12-...
5
by: Brad Wood | last post by:
The delete method of the FileSystemObject.FileObject does not return a result. If permissions disallow deletion, it will not raise an error. Conversely, if the delete method does succeed, a call...
4
by: StumpY | last post by:
Hi I am trying to append information collected from a form into a text file (already created and currently in the root of my web) on my ISP's webserver. The code snippet causing the problem is;...
0
by: debug03 | last post by:
I am executing a DTS package on a Windows 2000 sp4 server running SQL Server 2000 and IBM DB2 V7 client. The DTS package source data(SQL Server) is selected from SQL server table and inserts data to...
0
by: private.anders | last post by:
Hi David! Really need assistance since I have been struggling with a problem long time now. I am running a web application on a Win 2003 Std (Active Directory). Everything works fine. I have...
0
by: private.anders | last post by:
Really need your assistance since I have been struggling with a problem long time now. I am running a web application on a Win 2003 Std (Active Directory). Everything works fine. I have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.