C
Captain Infinity
In Message-ID: <[email protected]>
This worked well in Windows 98. Is there a tweak I need to make to get
it to work in XP? Perhaps something relating to the %temp% setting? I
notice the *foo* files are being created in
c:\documents and settings\owner\local settings\temp and that the cleanup
is not happening. Is this important? Or does the REM>filename command
just not work in XP? If not, is there something similar, or perhaps a
utility that will allow for mass overwriting of files in a way that
leaves the filenames?
TIA.
**
Captain Infinity
Robert B. Clark said:The line
REM>filename
will overwrite filename with a zero-byte file of the same name--truncates
it, IOW.
Here is a batch file I call ZERO.BAT that is built around this trick:
:: Truncates all specified files in cwd to 0-byte files.
:: R Clark 18 Dec 2003
::
@echo off
%comspec% /c %temp%\$foo1.bat > %temp%\$foo2.bat
:: Change filespec in parentheses below to whatever you need
for %%a in (*.bak) do call %temp%\$foo2 %%a
:: Clean up
for %%a in (%temp%\$foo?.bat) do del %%a>NUL
Of course, if you change the filespec so that it includes ZERO.BAT and the
batch file is in the current working directory, you'll have a spot of
trouble.
This worked well in Windows 98. Is there a tweak I need to make to get
it to work in XP? Perhaps something relating to the %temp% setting? I
notice the *foo* files are being created in
c:\documents and settings\owner\local settings\temp and that the cleanup
is not happening. Is this important? Or does the REM>filename command
just not work in XP? If not, is there something similar, or perhaps a
utility that will allow for mass overwriting of files in a way that
leaves the filenames?
TIA.
**
Captain Infinity