473,565 Members | 2,770 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

list system files

If I type dir /s in the command line prompt I can list all system files
ex.
get into the IE temporary files

C:\Documents and Settings\XXXXXX \Local Settings\Tempor ary Internet
Files

XXXXXX is a user name of the system

then do a dir /s

But I need to use VB.net to list all system files. I could not find
anything about it. use filesysteminfo or ?????

Please help!

Thanks!

Greg

Nov 29 '05 #1
3 2650
Greg,

I believe that dir /AS lists system files.

At any rate, to list the system files in a particular directory using VB.Net:

Dim di As New DirectoryInfo(" c:\temp")
Dim fi As FileInfo

For Each fi In di.GetFiles
If fi.Attributes And FileAttributes. System Then
MsgBox(fi.FullN ame)
End If
Next

Kerry Moorman
"greg chu" wrote:
If I type dir /s in the command line prompt I can list all system files
ex.
get into the IE temporary files

C:\Documents and Settings\XXXXXX \Local Settings\Tempor ary Internet
Files

XXXXXX is a user name of the system

then do a dir /s

But I need to use VB.net to list all system files. I could not find
anything about it. use filesysteminfo or ?????

Please help!

Thanks!

Greg

Nov 29 '05 #2
If I browse the internet files using IE -> tools -> internet options ->
settings, I see lots of temperary files. But if I use vb.net as shown
above, I only see 1 file.

Any clue?

Thanks!

Greg

Nov 29 '05 #3
"greg chu" <gr******@wendy s.com> wrote in message news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
If I browse the internet files using IE -> tools -> internet options ->
settings, I see lots of temperary files. But if I use vb.net as shown
above, I only see 1 file.

Any clue?


You're only looking for system files and there is usually only one
system file in the Temporary Internet Files folder: desktop.ini

Note that in a command shell, we normally use DIR /AS to list
system files. DIR /S actually lists all the files in the directory AND
its subdirectories.

Type DIR/? for full syntax


Nov 29 '05 #4

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

Similar topics

23
4015
by: Stan Cook | last post by:
I was trying to take a list of files in a directory and remove all but the ".dbf" files. I used the following to try to remove the items, but they would not remove. Any help would be greatly appreciated. x = 0 for each in _dbases: if each <> ".dbf": del each # also tried: del _dbases x = x + 1 I must be doing something...
2
5810
by: Brad Tilley | last post by:
I was using Python to tar up some files each day in a directory by calling os.popen("/bin/tar.......). Everything was working well until the app that generated the files was set to generate a file every two seconds for nine hours each day (16,200 files each day). After this I began getting this error: "Argument list too long" This would...
8
829
by: Opa | last post by:
Hi, Does anyone know how to get a list of files for a given directory from a given url. I have the following, but get an error indicating that URI formats are not supported. System.IO.DirectoryInfo di di = new System.IO.DirectoryInfo("http://www.websitehere.com/files/"); System.IO.FileInfo rgFiles = di.GetFiles("*.jpg");
8
2375
by: RML | last post by:
hey guys, i am looking at this piece of code that lists numbers of files in a directory. i want to convert it so it lists the files in th directory that end with .doc. i cant seem to get it to output correctly, i have included the original code, my modified code, and the output from my modifed code.. why does it list the files as...
11
2246
by: Madison Kelly | last post by:
Hi all, I am new to the list and I didn't want to seem rude at all so I wanted to ask if this was okay first. I have a program I have written in perl which uses a postgresSQL database as the backend. The program works but the performance is really bad. I have been reading as much as I can on optimizing performance but still it isn't very...
0
2902
by: cindy | last post by:
I have a dynamic datagrid. I have custom classes for the controls public class CreateEditItemTemplateDDL : ITemplate { DataTable dtBind; string strddlName; string strSelectedID; string strDataValueField; string strDataTextField; public CreateEditItemTemplateDDL(string DDLName,string DataValueField,string
2
1922
by: Jerry | last post by:
Hi!, I am just starting out in c# here and what I want to do is get a list of files, list them in a a listBox. I want the to beable to select either 1, 2, ... ALL files in this list and execute a job on them. Here is what I have so far: using System;
6
3144
by: kimiraikkonen | last post by:
Hello, I have a listbox and folder browser control. I need to display all .mp3 files' pathes into listbox. It was Ok with openfiledialog but how can list all .mp3 extension- having files into my listbox using folder browser control. A sample code would be great.
0
30186
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: List of autostart locations Linked from the Original article- "Windows Autorun FAQs: Description". Que: Can you list all the autostart locations for windows? Ans: Here is a comprehensive list of all autostart locations for Windows OSes: NOTE : These are some abbreviations used in this list. Please note them...
0
7888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7644
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
7951
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
6260
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
5213
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
3643
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
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2083
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
1201
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.