473,383 Members | 1,832 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,383 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 1302
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.