473,322 Members | 1,417 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,322 software developers and data experts.

fso.deletefolder and recycle bin

I am using fso.deletefolder(directory, true) to delete a directory and
all subdirectories. This is due to not having write access to some of
the files in the directory. However, these items are sent to the
recycle bin. Is there any way to do this without sending these items
to the recycle bin without having to empty the recycle bin completely?

Thanks,
Mike.

Jan 4 '07 #1
3 2016
<mm*******@gmail.comschrieb:
>I am using fso.deletefolder(directory, true) to delete a directory and
all subdirectories.
Why not use similar functionality from 'My.Computer.FileSystem.*' or
'System.IO.Directory'?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Jan 4 '07 #2
Neither of these methods work. I believe this is due to some of the
files being read-only. Any other suggestions?

Thanks.

Herfried K. Wagner [MVP] wrote:
<mm*******@gmail.comschrieb:
I am using fso.deletefolder(directory, true) to delete a directory and
all subdirectories.

Why not use similar functionality from 'My.Computer.FileSystem.*' or
'System.IO.Directory'?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Jan 5 '07 #3
Maybe I did it wrong, but I got the My.Computer.FileSystem option to
work.

Thanks.

mm*******@gmail.com wrote:
Neither of these methods work. I believe this is due to some of the
files being read-only. Any other suggestions?

Thanks.

Herfried K. Wagner [MVP] wrote:
<mm*******@gmail.comschrieb:
>I am using fso.deletefolder(directory, true) to delete a directory and
all subdirectories.
Why not use similar functionality from 'My.Computer.FileSystem.*' or
'System.IO.Directory'?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Jan 5 '07 #4

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

Similar topics

3
by: Chuck Anderson | last post by:
I know this is more of a Windows question, but I've Googled this and can not find an answer. Is there a PHP interface to the Windows recycle bin? I want to put files there instead of deleting...
4
by: Katja | last post by:
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...
1
by: Kerem Gümrükcü | last post by:
Hi, how can i get the pyhsical path to a recycle bin object. i am working with the FileSystemWatcher Object and i dont want to handle events inside the recycle bin, because the FSW Object...
1
by: Frank Meng | last post by:
Hi. I wrote a program to get the directory of "Recycle Bin" with SHGetSpecialFolderLocation . It works for "Recent", "SendTo", etc. but it doesn't work for "Recycle Bin". At...
5
by: Gene Vital | last post by:
Can someone point me in the right direction on how to send files to the Recyle Bin using C#.
2
by: John | last post by:
Is the only criteria for worker process recycle 60% physical memory usage?? (I'm on W2K, default setup - I know you can change it in machine.config). Because if so, when using SQL Server on the...
5
by: johnb41 | last post by:
I searched and found a way (via API) t0 add a deleted file to the recycle bin. (Thanks Ken Tucker! :)) But I was wondering if VB.NET 2005 (framework 2.0) has a non-api solution. (Note: i...
10
by: =?Utf-8?B?U3RlZmFuIEJhcmxvdw==?= | last post by:
This has been working perfectly for months. Since we switched from ASP.NET 1.1 to 2.0, we have constant and sporadic issues with updating our applications. Touching the web.config works about...
2
by: =?Utf-8?B?VVNBT3o=?= | last post by:
I am using Windows Vista Ultimate (x86). I accidently deleted my Desktop Recycle Bin. I restored it (Control Panel/Personalise/Change Desktop Icons). I clicked on the Recycle Bin (Full) icon...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.