Hide files under other files (merge) using command prompt

Here is how you can hide files from the prying eyes of others. This can be done by using the copy command in Command Prompt. The format of the command to merge files isĀ 

copy /b FILE1.ext+FILE2.ext+….+FILEn.EXT destination.EXT

Copy Command in work

The parameter /b tells the command to consider files as Binary. An example is “copy /b 1.jpg+2.zip 3.jpg” which will produce an image named 3.jpg after merging the image 1.jpg and compressed archive 2.zip The file is now treated as an Image of JPEG type. It’s always better to use two files as this will enable you to recover both the files (else you may need a hex editor to split the files).When you want to open the zipped file change the extension of the merged file from .jpg to .zip (if Windows Zip utility won’t open the file use another archive tool such as WinRAR or WinZIP).

The trick can be done with most of the file types. You will not able to recover the second file by changing the extension if both files are of same type, that is both JPG or both ZIP. A HEX editor can be used to find the header of second file, you may copy the data further onwards to a new file to get the lost file.

These are the screen shots of my merging process

The Image file and the Archive before MergingImage and Archive before merging

Files Merged (check out the file sizes of all the three files )
Merged file after The Archive has been locked under the image

The Image file after merging has been renamed to .rar (extension of second file) and has been opened using WinRAR

renamed and opened

If you use a zip file instead, Windows Compressed Folder manager may not recognize the file but a dedicated Archive tool like WinRAR will be able to open the archive.

If you enjoyed this article, you might also like...