ZTree.com  | ZEN  | About...  

 Index   Back

touch as well - how does?   [Help!]

By: Ben Kent       
Date: Mar 13,2018 at 19:02
In Response to: touch as well - how does? (Hartmut Schneider)

> > 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

226 views      
Thread locked
 

Messages in this Thread

 
94,426 Postings in 11,918 Threads, 348 registered users, 10 users online (1 registered, 9 guests)
Index | Admin contact |   Forum Time: Sep 18, 2019 - 7:10 pm EDT  |  Hits:28,649,384  (2,131 Today )
RSS Feed