473,543 Members | 3,699 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How To calculate File size in VB.net

16 New Member
I want to show the files size so please tell me code for that in vb.net.
Apr 5 '07 #1
1 10599
dip_developer
648 Recognized Expert Contributor
I want to show the files size so please tell me code for that in vb.net.
Dim fFile As New FileInfo(filena me)
Dim fSize As Integer= fFile.Length


it will give size in Byte
Apr 5 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

53
5659
by: Cardman | last post by:
Greetings, I am trying to solve a problem that has been inflicting my self created Order Forms for a long time, where the problem is that as I cannot reproduce this error myself, then it is difficult to know what is going on. One of these Order Forms you can see here... http://www.cardman.co.uk/orderform.php3
6
4120
by: Herrcho | last post by:
in K&R Chapter 6.3 it mentions two methods to calculate NKEYS. and points out the first one which is to terminate the list of initializers with a null pointer, then loop along keytab until the end is found is less efficient than using sizeof operator , since size of the array is completely determined at compile time. i don't quite...
4
16611
by: ivan | last post by:
Hi, How can we calculate the stack and heap size requried by a C program. Is there any specific formula used? Please suggest. regards, Ivan
96
4852
by: david ullua | last post by:
I am reading "Joel on Software" these days, and am in stuck with the question of "how to calculate bitsize of a byte" which is listed as one of the basic interview questions in Joel's book. Anyone could give some ideas?I am expecting your reply. David.
7
43849
by: carterweb | last post by:
This is how I do it now. 1. Determine the dimensions of the rectangle. 2. Set a my font size to a fixed maximum size. 3. Apply the font my string and measure the string using the graphics object. 4. If string size is less than the size of the rectangle, we are done.
5
2616
by: Michael | last post by:
Hi. I need dinamically calculate input text field based on parent static TD before showing content of input. Please, advice. Michael
3
2927
by: coolguyraj | last post by:
I have a javascript code to take value from two text boxes and calculate on triggering the "OnBlur" function and display in the third box. The code works fine with one line item,If i have more that one line item.i will be able too calculate the value only for the last line item added ,But if i change any of the values in the two boxes from...
11
8864
by: Thomas | last post by:
Hi, I'm pretty new to the programming world. I got stuck in the following problem. Please guide me about it. Well I'm trying to get the value of (128^100)^2 I've used long double type but to no avail. I even can't get the value of 2^128. How this problem can be solved? Similarly, I was trying to develoop a program in hich we can calculate
1
1762
by: mansi sharma | last post by:
Hey Frnds to calculate the File Size everytime we have to give extension such as .txt,.doc. AS FOLL-- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim filelength As Long filelength = GetFileSize("D:\Documents and Settings\Administrator\Desktop\Private Function SaveDetails.doc")...
6
11352
by: LaundroMat | last post by:
Hi - I'm trying to calculate unique hash values for binary files, independent of their location and filename, and I was wondering whether I'm going in the right direction. Basically, the hash values are calculated thusly: f = open('binaryfile.bin') import hashlib
0
7401
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7344
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7335
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
7681
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
4886
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
3387
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
3391
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1810
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

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.