473,545 Members | 2,747 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FileSystemObjec t DeleteFolder Permission Denied

Dear all,

I have a script that creates a FileSystemObjec t 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_buil d"

If fso.FolderExist s (zip_path & "\to_Zip") Then
error line -> fso.DeleteFolde r (zip_path & "\to_Zip" )
fso.CreateFolde r (zip_path & "\to_Zip" )
else
fso.CreateFolde r (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 13053
Is this folder shared?

Ray at work

"Katja" <ka**********@h otmail.com> wrote in message
news:a2******** *************** ***@posting.goo gle.com...
zip_path = "C:\cd_buil d"

If fso.FolderExist s (zip_path & "\to_Zip") Then
error line -> fso.DeleteFolde r (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******* *******@TK2MSFT NGP11.phx.gbl>. ..
Is this folder shared?

Ray at work

"Katja" <ka**********@h otmail.com> wrote in message
news:a2******** *************** ***@posting.goo gle.com...
zip_path = "C:\cd_buil d"

If fso.FolderExist s (zip_path & "\to_Zip") Then
error line -> fso.DeleteFolde r (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**********@h otmail.com> wrote in message
news:a2******** *************** ***@posting.goo gle.com...
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******* *******@TK2MSFT NGP11.phx.gbl>. ..
Is this folder shared?

Ray at work

"Katja" <ka**********@h otmail.com> wrote in message
news:a2******** *************** ***@posting.goo gle.com...
zip_path = "C:\cd_buil d"

If fso.FolderExist s (zip_path & "\to_Zip") Then
error line -> fso.DeleteFolde r (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
1578
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 same file. About 5 times within a 15 minute stress test, it returns "Permission Denied". I would think that this object is capable of asynchronous...
1
4645
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 presented with a username/password box when they view the page. No matter what I do, when the page attempts to access the remote server, I get a...
0
2709
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 = oRoot.SubFolders for Each oFolder in oFolders Response.Write FolderDisplayName next
4
12365
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- 03/Objeto_FileSystemObject.asp, line 17 Set objFSO = CreateObject("Scripting.FileSystemObject") Set Arquivo = objFSO.CreateTextFile("c:\Texto_teste.txt", True)...
5
7322
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 to FileExists directly afterward may return true because the system hasn't updated yet (or whatever actually goes on). Is there any way to...
4
3374
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; ...... 37 <% 38 Dim fso, f, TextFile 39 TextFile = Server.MapPath("mail.txt") 40 Const ForReading = 1, ForWriting = 2, ForAppending = 8 41 Set fso...
0
3186
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 the destination table(DB2). I get the following error when the package is executed: The execution of the following DTS Package succeeded: ...
0
3387
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 installed same application on another server Win 2003 R2 Std (No Active Directory). On that server I get “Permission denied” using the following...
0
1219
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 installed same application on another server Win 2003 R2 Std (No Active Directory). On that server I get “Permission denied” using the following code (used...
0
7946
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7457
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7791
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6026
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3491
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1921
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1045
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.