Re: Delete from file

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



The only thing I could think of is opening the file multiple times with
share access and doing some form of data "shift" using two file pointers -
essentially copying file data within the target file itself. It could be
slow and terribly thrashy if, for example, you deleted a single byte at the
start of a 16MB file. You'd end up copying the entire 16MB one byte at a
time to shift it.

On the plus side, at least it would work.


--

Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com



"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:e4r%23bMuIIHA.4808@xxxxxxxxxxxxxxxxxxxxxxx
Sounds like he wants to remove a section of a file that is half the size
of the available storage. Since you can't just cut out some bytes from
the middle, the only practical way to do it is to create a new file and
copy just the parts of the old file that you want into the new file.
However, if the old file is half the size of the storage, that's a
problem. There's no fix that I can think of other than to stop growing
the other file sooner...

Paul T.

"Simon Hart [MVP]" <srhartone@xxxxxxxxx> wrote in message
news:65CF40AF-3995-4E8A-AFB9-C74CC3DB7C0B@xxxxxxxxxxxxxxxx
I don't understand what you are trying to achieve. Are you saying, when
the
file equals a certain size, you want to delete it?
--
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com


"Ole" wrote:

I know that it generally isn't possible to delete a part of a file, but
I'll
pop this question anyway in case there is a good idea out there:

I have a program that runs on a PDA with e.g. 32MB storage. The program
generate a file and if the file exceed 16MB I do not have the
possibility to
delete a single character from the file, because I normally will have to
create a new file without the character and after that delete the
original
file ---- or what????

Thanks
Ole







.



Relevant Pages

  • Re: Delete from file
    ... at a time to shift it. ... of the available storage. ... Visual Developer - Device Application Development MVP ... delete a single character from the file, ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: By Pass Password
    ... The developer is no longer working; the db is already mdb and I cannot ... "Tom van Stiphout" wrote: ... Of course you can also talk to the original developer. ... that the Shift key is disabled.?! ...
    (microsoft.public.access.security)
  • Re: trends
    ... Testing will shift a little bit to more encompass the developer. ... misinterpret these results and start to wonder if QA is really needed ...
    (comp.software.testing)
  • Sharepoint & Exchange Files
    ... "Drive" How shift the storage over to the other drive? ... moved the user space, but can't find a way or utility to get the sharepoint ... Prev by Date: ...
    (microsoft.public.windows.server.sbs)
  • Moving directory to new partition
    ... In order to shift some of the storage I simply did a mv /usr/doc ... Any reason why this will not work ok? ...
    (linux.redhat)