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

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 1304
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
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,...
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,...

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.