Dennis
echo. > TEST.TXT
...at the 'Command Prompt' (any dos version)
Then type :
edit.com /79 TEST.TXT
and delete the space and the two odd characters.
Save the file and exit EDIT.COM
Alternatively, use any other binary text editor do delete the CR+LF
end-of-line (return) characters to make the file 0 [zero] bytes.
==
Cheers, Tim Meddick, Peckham, London. :-)
"Dennis Halver" <ha...@persrec.com> wrote in message
news:4a526f74$0$32682$9b4e...@newsspool2.arcor-online.net...
Then the command :
xecho #P >Test.txt
Will Not include the CR+LF linefeed 'characters' in creating the
'Test.txt' file
Xecho.com is available at :
==
Cheers, Tim Meddick, Peckham, London. :-)
"Tim Meddick" <timme...@gawab.com> wrote in message
news:h2u7pi$mr$1...@aioe.org...
>Alternatively still; download the small but powerful XECHO.COM utility.
>
>Then the command :
>
>xecho #P >Test.txt
>> To create a file with length of 0 [zero] bytes in length type :
>> echo. > TEST.TXT
>> and delete the space and the two odd characters.
Is there something wrong with this on the on-topic OS?
rem>file.txt
Considering that only the regulars of this group actually know what
"on-topic OS" means, this may be considered an Outsider antic. ;-)
--
Todd Vargo
(Post questions to group only. Remove "z" to email personal messages)
Other than the fact that it has no effect? (Have you tried it?)
rem "" >a.txt (tested)
Hmm. It sure doesn't work on my machine (Vista, 64-bit).
foxidrive's approach works in 'true' DOS based OSs, like DOS 6.2,
Win9x and Win Me. It no longer works in WinNT+. However, I believe
the following will work in (nearly?) all OSs ...
set nul=>test.txt
The name of the variable is not particularly important - only that it
should not exist, unless the intent is to remove it from the current
environment.
Tom Lavedas
***********
http://there.is.no.more/tglbatch/
OK, granted, I know the name of the group has "msdos" in it, but I
really wasn't thinking in terms of people using actual DOS any more. :-)
> However, I believe
> the following will work in (nearly?) all OSs ...
>
> set nul=>test.txt
>
> The name of the variable is not particularly important - only that it
> should not exist, unless the intent is to remove it from the current
> environment.
It does indeed work in the Vista command prompt window!
"on-topic OS"
...it is for this reason that I attempted, in my clumsy way, to try and
explain why it is a seemingly 'empty' file often has a size of 3
bytes...
Even if I had known of (rem >test.txt) I don't think I would have quoted
it as (despite the comments) my explanation was simple enough, while
still being concise, AND was relevant in ALL OS-es .
==
Cheers, Tim Meddick, Peckham, London. :-)
"Harlan Messinger" <hmessinger...@comcast.net> wrote in message
news:7bhq55F...@mid.individual.net...
As a followup; it occurs to me that the following is a safer way to
achieve the desired result ...
set nul=%nul%>test.txt
Structuring it this way insures that the environment remains
unchanged, regardless of the status of the environment before the
statement is issued.
Tom Lavedas
***********
That throws an error on my XPPSP3 machine.
It appears the OP multi-posted and this same topic is covered in great
detail over in alt.msdos.batch.nt, where the shortest approach I've
seen to far is ...
cd.>test.txt
That should work in pretty nearly all MS OSs.
Tom Lavedas
OP, if you are out there and reading this message, please do us the
courtesy of allowing the multipost to do what it was intended to do,
or at the very least indicate in the original post that you've set
followups to a specific group.
--
Zaphod
No matter where you go, there you are!
However, it also creates the file "Test.txt" with 0 [zero] bytes!
==
Cheers, Tim Meddick, Peckham, London. :-)
"T Lavedas" <tglb...@cox.net> wrote in message
news:1cf74c95-922f-45b6...@t21g2000yqi.googlegroups.com...