> > copy /b name.ext,,+
>
> Ben, what do the two commas mean?
> I guess they are delimiters like space, so the 2nd arg is empty.
>
> How is the singe '+' (then 3rd arg) interpreted by CMD ?
No idea of the details, it's just a very old DOS trick I learnt years ago, which is was ported to cmd.exe.
So I get out my ring bound IBM DOS 3.20 manual and have a read, from the days when they made proper manuals.
Condensing the prose
---------------------
When using + remember to use /b for binary files.
Combine all the *.lst files into one combin.prn file
copy *.lst combin.prn
Combine all the *.lst and then the *.ref files into one combin.prn file
copy *.lst+*.ref combin.prn
For each *.lst file, combine with the matching *.ref file and write to a *.prn file
copy *.lst+*.ref *.prn
Concatenate all *.lst files to all.lst, if all.lst already exists, the command will overwrite all.lst at the start and then error when it get to all.lst
copy *.lst all.lst
Combine all *.lst files into all.lst, (remember the default output name is the first input file)
copy all.lst+*.lst
Copy to current drive (A:) with new date
A>copy b:xyz.asm+
To simply change the date and time
A>copy b:xyz.asm+,, b:
Append all files and output as the first file name.
A>copy b:*.*+,, b:
---------------------
So I have a test (on Win 8.1), all three of these change the date and time, so it's the "+" with no second or output file that is important.
copy /b name.ext,,+
copy /b name.ext+,,
copy /b name.ext+
> __
>
> I tried this and noticed that this command does _not set the A
> attribute on the touched file! Surprising...
Yes in some ways, but the contents have not been changed, only the metadata.
>
> Hartmut
Ben