We help IT Professionals succeed at work.

Explain dos Command

RGuillermo
RGuillermo asked
on
Hello experts,

Please can you explain me exactly what this command does ?

/C copy /b Image1.jpg + Archive.rar Image2.jpg

Best regards
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2019
Most Valuable Expert 2018
Commented:
It copies Image1.jpg and Archive.rar into a single file named "Image2.jpg"; this happens in binary (/b) mode, which means it adds Archive.rar directly after Image1.jpg.
The /C is meant for cmd.exe; it means to run the command following the /c, then close cmd.exe again.
RGuillermoProject Manager

Author

Commented:
Thank you so much!!
Bill PrewTest your restores, not your backups...
CERTIFIED EXPERT
Expert of the Year 2019
Top Expert 2016

Commented:
Which honestly I can't see the purpose / value of?  Those are two very different file formats, and once they are combined I don't see how the contents of the RAR file can be accessed from the new Image2.jpg file.  Image2.jpg should display as ain image (JPG) file when you open it, but the RAR will be ignored.


»bp
Qlemo"Batchelor", Developer and EE Topic Advisor
CERTIFIED EXPERT
Top Expert 2015

Commented:
Maybe a way to hide the rar file ...
RGuillermoProject Manager

Author

Commented:
It was an example, a piece of code  I copy paste from the internet
cant remember what page I visited.
The example works well with my own dos commands.
Although I don't need the dos command the example came with
I just wanted to understand what it does.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.