Re: How to create file with 0 bytes (length) ?



On Jul 6, 10:50 pm, p...@xxxxxxxxxxxxxxxxxx wrote:

That said, I spent a few minutes playing around at the DOS prompt
and all that seems necessary is to run some command that writes
nothing to STDOUT and redirect to a file.  For example:

  echo. > tempfile.$$$
  del tempfile.$$$ > zerosize.fil

creates a zero length file.

rem > tempfile.$$$

is one easy way; REM doesn't display anything to stdout. Even easier,
using 4DOS, is

tempfile.$$$

i.e. redirect output without executing any command!

--
Charles Dye
.



Relevant Pages

  • Re: last character of the last line is a newline?
    ... Would it be possible to redirect only to a file. ... output to standard output. ... # to stdout and to your_file ... Substitute your_program by the compound command of your original posting: ...
    (comp.unix.shell)
  • Re: Start a program and get a hold of its STDOUT and STDIN?
    ... one would just redirect it on the command line: ... > was examples of getting STDIN or STDOUT but not both at ... I need this to be in real time (when the ...
    (comp.lang.perl.misc)
  • Re: Cron Daemon backup message too big
    ... What this command does is to concatenate stdout + errors and redirect ... Could I avoid this by terminating the command line instead like this: ... though you need a redirect to the file too like so: ...
    (Debian-User)
  • Re: Pipes and interprocess communication
    ... > command line argument) as a separate process. ... I redirect the stdout, ... > I then redirect the stdout of my program from the command line: ...
    (microsoft.public.vc.language)
  • Re: Problem with WSH Shell Exec StdOut
    ... catch its StdOut stream in real time. ... NeroCmd.exe is a command line utility included ... Here is the script I'm currently using: ...
    (microsoft.public.scripting.vbscript)

Loading