|
-
Jun 24th, 2000, 09:35 PM
#1
Thread Starter
transcendental analytic
Well since no one did found out the answer, last time i asked this, how do you shorten a file without having to rewrite it again?
In example a 50M file would take about 15 seconds to remove the last 1 byte, not too impressive. I'm sure it can be done, maybe not in vb but in C++ or something.
Thanks.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jun 24th, 2000, 10:46 PM
#2
Lively Member
Why?
Kedaman why can't you overwrite the file? just wondering, and what are you trying to do???? 
Later(z)
REM
"Innovate, don't immitate."
-
Jun 25th, 2000, 06:38 AM
#3
Thread Starter
transcendental analytic
Well, actually it's just mp3's that are from 3-5M but it costs a second and on slower machines up to 10 sec. I've posted this earlier but nobody did know. Now I hope someone knows, and i know it must be some way of doing it
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Sep 10th, 2002, 01:38 PM
#4
New Member
I'm trying to find the same answer, it seems it might be possible if you open it and work it via API calls, then there is a function:
Private Declare Function SetEndOfFile Lib "kernel32" (ByVal hFile As Long) As Long
That can do it, the trick is converting a Filenumber to a file handle
-
Sep 10th, 2002, 01:51 PM
#5
Fanatic Member
FindFirstFile(...) will give you a filehandle...
ReadFile(...) will allow you to go to the position where you want to set the EndofFile.
SetEndofFile(...) will set the end of the file to be that position that you read to (AFAIK).
Rember to use FindClose(...) when done w/the handle.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|