PC Review


Reply
Thread Tools Rate Thread

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

 
 
acool
Guest
Posts: n/a
 
      1st Apr 2004
I looked all over at the File class and saw nothing for getting the size of
a file, how do i do that?


 
Reply With Quote
 
 
 
 
CJ Taylor
Guest
Posts: n/a
 
      1st Apr 2004
Look at the FileInfo class

in particular the Length property.


"acool" <(E-Mail Removed)> wrote in message
news:%23IvzA$(E-Mail Removed)...
> I looked all over at the File class and saw nothing for getting the size

of
> a file, how do i do that?
>
>



 
Reply With Quote
 
Scott
Guest
Posts: n/a
 
      1st Apr 2004
Check out the "Length" member of the "FileInfo" class...


"acool" <(E-Mail Removed)> wrote in message
news:%23IvzA$(E-Mail Removed)...
> I looked all over at the File class and saw nothing for getting the size

of
> a file, how do i do that?
>
>



 
Reply With Quote
 
acool
Guest
Posts: n/a
 
      1st Apr 2004
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Check out the "Length" member of the "FileInfo" class...
>
>
> "acool" <(E-Mail Removed)> wrote in message
> news:%23IvzA$(E-Mail Removed)...
> > I looked all over at the File class and saw nothing for getting the size

> of
> > a file, how do i do that?
> >
> >

>
>



 
Reply With Quote
 
CJ Taylor
Guest
Posts: n/a
 
      1st Apr 2004
Dim fInfo as new System.Io.FileInfo(path*name of file)


"acool" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > Check out the "Length" member of the "FileInfo" class...
> >
> >
> > "acool" <(E-Mail Removed)> wrote in message
> > news:%23IvzA$(E-Mail Removed)...
> > > I looked all over at the File class and saw nothing for getting the

size
> > of
> > > a file, how do i do that?
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      1st Apr 2004
* "acool" <(E-Mail Removed)> 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/>
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to Find the size of the file throwing exception Bobby Microsoft Excel Programming 1 18th Jun 2009 10:57 PM
Can't find Vista site. Setting memory dump file size on Vista? dareys Windows XP General 4 28th Nov 2008 06:33 AM
How do I find invisible objects contributing to excel file size? Francis O Microsoft Excel Misc 4 15th Oct 2008 02:26 AM
Find the object that increases the file size =?Utf-8?B?UlN1bmRheQ==?= Microsoft Powerpoint 3 9th Nov 2007 04:46 PM
How to find file size? DBC User Microsoft C# .NET 2 28th Aug 2006 11:13 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:41 PM.