473,466 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How do I find the size of a file???

I looked all over at the File class and saw nothing for getting the size of
a file, how do i do that?
Nov 20 '05 #1
8 1305
Look at the FileInfo class

in particular the Length property.
"acool" <no**@sendme.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I looked all over at the File class and saw nothing for getting the size of a file, how do i do that?

Nov 20 '05 #2
Check out the "Length" member of the "FileInfo" class...
"acool" <no**@sendme.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I looked all over at the File class and saw nothing for getting the size of a file, how do i do that?

Nov 20 '05 #3
I appreciate it and you know that should be helpful but looking up the
example in MSDN shows you having to iterate through an ENTIRE directory when
i already have the name and path of a file I just want the length of ONE
file. how do I do that?

"Scott" <sc*****@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Check out the "Length" member of the "FileInfo" class...
"acool" <no**@sendme.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I looked all over at the File class and saw nothing for getting the size

of
a file, how do i do that?


Nov 20 '05 #4
Dim fInfo as new System.Io.FileInfo(path*name of file)
"acool" <no**@sendme.com> wrote in message
news:uo**************@TK2MSFTNGP12.phx.gbl...
I appreciate it and you know that should be helpful but looking up the
example in MSDN shows you having to iterate through an ENTIRE directory when i already have the name and path of a file I just want the length of ONE
file. how do I do that?

"Scott" <sc*****@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Check out the "Length" member of the "FileInfo" class...
"acool" <no**@sendme.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I looked all over at the File class and saw nothing for getting the
size of
a file, how do i do that?



Nov 20 '05 #5
I appreciate it and you know that should be helpful but looking up the
example in MSDN shows you having to iterate through an ENTIRE directory when
i already have the name and path of a file I just want the length of ONE
file. how do I do that?

"Scott" <sc*****@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Check out the "Length" member of the "FileInfo" class...
"acool" <no**@sendme.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I looked all over at the File class and saw nothing for getting the size

of
a file, how do i do that?


Nov 20 '05 #6
Dim fInfo as new System.Io.FileInfo(path*name of file)
"acool" <no**@sendme.com> wrote in message
news:uo**************@TK2MSFTNGP12.phx.gbl...
I appreciate it and you know that should be helpful but looking up the
example in MSDN shows you having to iterate through an ENTIRE directory when i already have the name and path of a file I just want the length of ONE
file. how do I do that?

"Scott" <sc*****@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Check out the "Length" member of the "FileInfo" class...
"acool" <no**@sendme.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I looked all over at the File class and saw nothing for getting the
size of
a file, how do i do that?



Nov 20 '05 #7
* "acool" <no**@sendme.com> scripsit:
I looked all over at the File class and saw nothing for getting the size of
a file, how do i do that?


'Microsoft.VisualBasic.FileSystem.FileLen', 'System.IO.FileInfo.Length'.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #8
* "acool" <no**@sendme.com> scripsit:
I looked all over at the File class and saw nothing for getting the size of
a file, how do i do that?


'Microsoft.VisualBasic.FileSystem.FileLen', 'System.IO.FileInfo.Length'.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #9

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

Similar topics

1
by: Harsha | last post by:
I have been working on VB, ASP for quite a long time. Very Recently ( From past 1 month) I am managing a VC++ project. I am trying to use the code which i downloaded from the internet to find the...
2
by: Vince | last post by:
I have a very specific problem to solve but I cannot find a data structure for it. I don't know if I am posting on the good newsgroup but I cannot find a software.design group. I would like to...
5
by: nmtoan | last post by:
Hi, I could not find any answer to this simple question of mine. Suppose I have to write a program, the main parts of it are as follows: #include <blahblah.h> struct {
2
by: John Regan | last post by:
Hello All I am trying to find the owner of a file or folder on our network (Windows 2000 Server) using VB.Net and/or API. so I can search for Folders that don't follow our company's specified...
1
by: unknown198790 | last post by:
actually i created tftp server.server was created successfully but when i try to execute the following it say file not found tftp 192.168.0.1 tftp> put j.txt error code 1: file not found tftp...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...
1
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...
0
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,...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.