Re: How to "zero" a file after a certain size ?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Torgeir Bakken \(MVP\) (Torgeir.Bakken-spam_at_hydro.com)
Date: 09/15/04


Date: Wed, 15 Sep 2004 15:35:51 +0200

Michael Harris (MVP) wrote:

> tsltim wrote:
>
>>I have a file that grows very quickly at times. What command can be
>>used to "zero" the file say when the file reaches 1 GB in size ?
>>Deleting the file would not work because some process is still
>>writing to it.
>
>
> Use FSO to open it ForWriting and close it without writing anything...
>
>
Hi

If the file is already opened for writing I would think this will
fail...

-- 
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx


Relevant Pages

  • Re: "Type mismatch" error in JScript - newby question
    ... > KAREN27 wrote: ... >> to then open that file for writing into it, I keep on getting a "type ... > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.scripting.jscript)
  • Re: Cant update BITS 2.0 plus
    ... > Renaming or deleting the Catroot2 folder is most likely what you ... > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.windowsupdate)
  • Re: C:WINDOWSsystem32autoexec.nt The system file is not suitabl
    ... Thanks to everyone for your prompt replies. ... > In the command prompt, type in the following two commands exactly as ... > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.windowsxp.configuration_manage)
  • Re: Error number: 0x800A0046
    ... > newsgroup because my dialup network settings had vanished and a guy ... > Notice that the logon account is set to a NT/User account under the RPC ... > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.windowsupdate)
  • Re: opening "owner" files after hard drive failure
    ... >> My hardrive posts a failure warning, and XP Home SP2 crashes soon after ... > that has Administrative rights to have access to the Security tab. ... > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.windowsxp.general)