|
by: Jobs |
last post by:
Hello All,
I want to delete all files in a directory. I am making a backup copy of all
files in the directories say c:\abc by reading and writing to a file. After
making a backup copy I want to delete these files. I am using following
code:
// get list of all files in the directories
|
by: Earl Teigrob |
last post by:
Does someone have or know of an algorythm (method) that will delete all
files under a give directory and its subdirectories based on a wildcard
mask?
I can use this for one directory
for each file in Directory.GetFiles("pic1.*")
file.Delete()
but will need to use a recursive algorythm to get all its subdirectories
|
by: Lucas Tam |
last post by:
I have a very simple loop:
If (Directory.Exists(tempDirectory)) Then
Try
Dim Files() As String = Directory.GetFiles(tempDirectory)
'Clear out directory
For Each Filename As String In Files
File.Delete(Filename)
Next
Catch ex As Exception
|
by: Arpan |
last post by:
A Form has a FileUpload, 2 Buttons & a TextBox web server controls.
Using the FileUpload control, I want to give users the provision to
move & delete files that DO NOT exist in C:\Inetpub\wwwroot (i.e. the
root directory). This is the code:
<script runat="server">
Sub MoveFile(ByVal obj As Object, ByVal ea As EventArgs)
File.Move(fudFileSource.FileName, txtFileDest.Text)
'File.Move("F:\4.jpg", "C:\4.jpg")
End Sub
|
by: Anil Gupte |
last post by:
Private Sub mnu2Exit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles mnu2Exit.Click
Dim fDir As String = Path.GetDirectoryName(L3Global.VideoFileName)
File.Delete(L3Global.VideoFileName)
' The following is not working - reports directory not empty exception
' Directory.Delete(fDir)
|
|
by: jlskutt |
last post by:
I'm getting an odd Exception thrown using Directory.Delete.
Directory.Delete(publicData + "Chatrooms/K" + kingd, true);
Directory.Delete(publicData + "Kingdoms/" + kingd, true);
There are the two lines of code I have. First line works fine. Second line thriows an IO exception. None of the files are read only in the directory, and the directory exists. The odd thing is the files in the directory are getting deleted, but the directory...
|
by: biganthony via AccessMonster.com |
last post by:
Hi,
I have the following code to select a folder and then delete it. I keep
getting a Path/File error on the line that deletes the actual folder. The
line before that line deletes the files in the folder but I get the error
message when the procedure attempts to delete the folder selected in the
BrowseforFolderbyPath function.
How can I get it to delete the folder that the user has selected in the
Browse for Folder dialog?
|
by: fniles |
last post by:
I am using VB.NET 2005.
When I try to delete a folder that has files underneath it, it gave me "the
directory is not empty" error.
f = New IO.DirectoryInfo("C:\myfolder")
If f.Exists Then
f.Delete() --error "the directory is not empty"
End If
How can I delete a folder with files underneath it ? Thank you.
|
by: wolfsbane |
last post by:
Alright, here it is I am trying to write a win32 app in VB 2005 to clean up user's profiles. everything works correctly except for the Delete("directory", True) statement. I get a System.IO.DirectoryNotFoundException: Could not find a part of the path. Then it gives me a random file name from the UserProfile\Local Settings\Temporary Internet Files\Content.IE5\SomeRandomFolder. This is absolutley driving me nuts. So I am gonn give you a basic...
|
by: Airslash |
last post by:
Hi,
I'm currently working on a function to delete a folder and its files + subfolders.
The function currently works for the target folder, but refuses to delete the subfolders and files in the subfolder.
When I debugged the code it returned value 1024 n the SHFileOperation function. I have no idea what it means.
anyone could tell me why the function is not deleting it's subdirectory?
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
|
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 captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|