|
by: Demetri |
last post by:
Using the GetFiles method of the DirectoryInfo instance
one can pass in a search pattern of string type.
For example:
DirectoryInfo di = new DirectoryInfo("C:\temp");
FileInfo fi = di.GetFiles("*.doc");
That code would return all the files with the doc
extension in the C:\temp folder. No problem.
|
by: S. Han |
last post by:
I'm using Directory.GetFiles to enumerate files in a directory. The problem
is if you have to enumerate all files + subdirectories recursively, it takes
too much memory, and it fails.
Is there another way to enumerate files and subdirectories recursively which
doesn't take too much memory in CS?
|
by: huzz |
last post by:
when i run the code below to search my entire c drive.. i get this following
error message:
Access to the path "c:\System Volume Information" is denied.
Line 29: foreach (string f in Directory.GetFiles(d, ".mp3"))
In web.config i have <identity impersonate="true"/>
When i run the same code in Windows Form it works fine, also i like to know
how i can put the results into an array instead of using response.write.
|
by: CJ Taylor |
last post by:
Hey Everyone,
Sorry haven't been around to answer questions as much as usual (or at all
for that matter) just been engrossed in a project. Anyways, dealing with an
issue using DirectoryInfo.GetFiles wondering if anyone had the same issues
I built my function to get the files, using a searchPattern filter (*.tif)
in which case I have about a gig of files in this directory (about 5000
files) and using getFiles is slower than anything I...
|
by: Tom Scales |
last post by:
OK, I admit, I am not a VB.NET expert and am still learning, but have run
into an annoying problem. I'm writing a program that has to search the file
system and therefore processes large numbers of directories and files. I've
figured out DirectoryInfo (it's pretty simple), but when I invoke
DirectoryInfo.GetFiles (or even DirectoryInfo.GetDirectories), it can take
forever. Some of the directories have thousands of files in them.
So, my...
|
|
by: Starbuck |
last post by:
Hi
When the routine below is run it gets to the line - Dim fileEntries As
String() = Directory.GetFiles(tString) and then freezes, there is no errors
etc, the program just stops responding. The path is correct and does exist
and there is a test file in there
Any thoughts please?
Private Sub InboxTimer_Tick(ByVal sender As System.Object, ByVal e As
|
by: Chris |
last post by:
Hi everyone,
I'm trying to find the fastest way to get all the files from the local c:
drive. I have even considered the api calls findfirst/findnext, but read
that in VB.net it's best to use the GetFiles function.
I'm using:
Dim files As String() = System.IO.Directory.GetFiles("c:\", "*.*",
IO.SearchOption.AllDirectories)
|
by: Lance |
last post by:
Hi All,
I'm working on a program that requires searching multiple drives for multiple file types
and cataloging them based on certain geospatial attributes. All together, there are
hundreds of thousands of files on the drives. As part of the process, I'm currently using
the GetFiles method of the FileSystem object to retrieve collection of strings
representing a collection of a particular file type (for example, tif files). The problem...
|
by: cjb |
last post by:
Is there a way to get Directory.GetFiles to return multi-language file names?
I haven't found any overloads that allow any such parameter. The way I am
using it now is:
foreach (string d in Directory.GetDirectories("C:\\")) {
foreach (string f in Directory.GetFiles(d, "*.exe")) {
MessageBox.Show(f);
}
}
|
by: Julie Smith |
last post by:
Hi,
Is it just me or does the search pattern parameter in Directory.GetFiles()
have a problem with the '?' character?
'*.*' works to find all files, but '?.*' does not work to find all files
that have only a one letter (and infinite extension size) filename. In fact,
it seems to act the same as '*.*'...
Is this by design?
|
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: 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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 most users, this new feature is actually very convenient. If you want to control the update process,...
|
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: 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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
|
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: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|