•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 332,567 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,174 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser:
Views: 98 | Replies: 2 | Solved
![]() |
•
•
Join Date: May 2008
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
Does anyone know how to change the value of FS.Length? I keep getting that it's read only.
I need to read a file, let's say it's 100 bytes in size. After some data manipulation, the file becomes 40 bytes. When I write the file back , it writes the 40 bytes plus the remainder of the file thus the file remains at 100 bytes.
I know that if I read the file as File A, write it back as File B and then delete File A would probably work but I want to overwrite the existing file.
I have noticed the the value of FS.Length does not change although the data string that I am writing is 40 bytes.
I need to read a file, let's say it's 100 bytes in size. After some data manipulation, the file becomes 40 bytes. When I write the file back , it writes the 40 bytes plus the remainder of the file thus the file remains at 100 bytes.
I know that if I read the file as File A, write it back as File B and then delete File A would probably work but I want to overwrite the existing file.
I have noticed the the value of FS.Length does not change although the data string that I am writing is 40 bytes.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb VB.NET Marketplace
Similar Threads
- Open In New Window Php (PHP)
- Paper size in MS Word 2003 (Windows Software)
- reading a file using fscanf (C)
- is it possible to change the size of jpg file through programming in vb (Visual Basic 4 / 5 / 6)
- coolwebsearch virus and related problems (Viruses, Spyware and other Nasties)
- window size keeps changing (Windows 9x / Me)
- Set, View, Change, or Remove Special Permissions for Files and Folders in Windows XP (Windows tips 'n' tweaks)
Other Threads in the VB.NET Forum
- Previous Thread: ParamArray Example
- Next Thread: RS232 File Transfer Problems


Linear Mode