473,811 Members | 3,055 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

REG: Getting the size of a network shared file using FileInfo.len

hi,

I am facing an issue with getting the file size of a network shared file. I
tried using FileInfo.length and it is returning me size that is rounded off
to the nearest 1024 bytes. E.g. for a file of size 900 bytes,
FileInfo.lenght returns me 1024.

Using native GetFileSize also showed the same behaviour.

Is there any way to find the correct size of a network shared file?
Aug 11 '05 #1
0 1466

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

Similar topics

1
2638
by: dixie | last post by:
I have a .reg file that I need to run across a network. Currently, we run it for each logon on the network manually, which is not really working well as there are over a hundred users and they don't necessarily all use their own machines all the time. How does the system administrator run a .reg file for all users on the network. If this is off topic, could you please direct me to an area where I might get a response. The reason for...
0
1176
by: bob | last post by:
I have a somewhat complex question about how Threading works across the network. Below is the full source code of a program that will list any file modified on myServer. When I run this code from myWorkstation and search myServer using a network share (using a Thread set to priority.Lowest) does myWorkstation inform myServer that this is a low priority thread? Since myServer is a production server, I don't want my file monitoring...
1
2950
by: Uzi Baruch | last post by:
Hi! I need to get file information from a remote computer, the thing is, i need to use different credentials to get that information. My question is: how the add the credentials to my code, and with what
3
6623
by: Curtis Kam | last post by:
Hi, How can I monitor the file size of a file which is still copying? If I've used FileInfo.Length, it'll return the final file size, not the intermediate one. Thanks. Regards, Curtis Kam
2
2678
by: .Net Believer | last post by:
I using the routine below to copy file to a network drive for a regular backup process. Before calling this routine I using another function to check the presence of the LAN connection and the server where the network drive exists. Although of this check I am sometimes getting an exception (in 5% of times)saying "Could not find the U:\...\File.ext" or part of its path" Although the network dirve is available and accessible by windows...
12
4143
by: grouped2000 | last post by:
g'day group, I need some code that will give me the total size of a folder. In the MSDN I've found some code, but I cannot figure out how to use this code at all ... I am quite new to .NET, I have been using VB6 always. Can anyone point me in the right direction? How will the following code give me the total size of al files in
0
272
by: PlanarIndia | last post by:
hi, I am facing an issue with getting the file size of a network shared file. I tried using FileInfo.length and it is returning me size that is rounded off to the nearest 1024 bytes. E.g. for a file of size 900 bytes, FileInfo.lenght returns me 1024. Using native GetFileSize also showed the same behaviour. Is there any way to find the correct size of a network shared file?
4
1934
by: Goran Djuranovic | last post by:
Hi All, The following code works fine in VB.NET (Windows app and Web app projects) when converted to VB. It also works fine in C#, BUT only in Windows app project. All tested applications contain only this code on loading of the application (form). Why does it not work in C# Web app project? Could this be a bug? I am using VS.NET 2003 EA System.IO.DirectoryInfo di = new...
2
8621
by: rn5a | last post by:
Using the FileSystemInfo class, I am retrieving all the directories & files existing in a particular directory on the server & listing them in a ListBox. If an item in the ListBox happens to be a directory, then the ListItem should display the directory name which will be appended with the text <DIR>. If an item in the ListBox happens to be a file, then the ListItem should display the file name which will be appended with the size of the...
0
9731
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9605
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10651
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10405
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
10136
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7671
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6893
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5556
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4342
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.