1

I recently saw a cpoy command in a batch script that looked like this:

copy <file> /B+ ,,/Y

I know the /B means to do a binary copy. I believe the + is just affirming the /B command, but am not sure. I know the /Y means yes to all and accepts all prompts for confirmation. I haven't been able to find anything about what the ,, is doing. I've run the command on a dummy file to see if anything changed, but I could not find a copied file anywhere.

What does copy <file> /B+ ,,/Y do?

Tuffwer
  • 1,027
  • 9
  • 23

1 Answers1

2

It updates the file time.

, used with copy to indicate missing parameters. This updates the files 
modified date. E.G. copy /b file1,,

See my list here Trouble with renaming folders and sub folders using Batch

So it is concatenating 1 file. That updates last modified.

Source is MSDos 6.22 Help file that can't be opened in 64 bit windows. Dos help files are compressed so can't be read by notepad.

Community
  • 1
  • 1
  • Thanks! I haven't been able to find that information anywhere, and it's not in `copy /?` Do you remember where you came across it originally? Are you aware of some sort of more complete official documentation stowed in some corner of microsofts servers somewhere? – Tuffwer Mar 18 '16 at 16:41
  • Comes from MSDos 6.22 Help file that can't be used in 64 bit windows. –  Mar 18 '16 at 16:42
  • _can't be used in 64 bit windows._ ... That's mildly annoying. – Tuffwer Mar 18 '16 at 16:43
  • The Dos help files are compressed so notepad can't help. Dos help files are displayed by QBasic program. If you have a virtual machine I can give you the files I just uploaded to skydrive the files in Dos622help.zip. https://onedrive.live.com/redir?resid=E2F0CE17A268A4FA!121&authkey=!AAFg7j814-lJtmI&ithint=folder%2cres –  Mar 20 '16 at 00:27