Wednesday, July 04, 2007

Hiding a file (a simple way)

Go to command prompt and enter following command

C:\>notepad visible.txt:hidden.txt

Enter text in the new notepad window and save it.
A new file visible.txt will be created but it will be
blank!!
You can not find ‘C:\visible.txt:hidden.txt’ but its there along with its content you have just typed!!

To prove it enter the same command

C:\>notepad visible.txt:hidden.txt

Note:
1) You canchoose some secret filename after visible.txt: so others can’t guess.
2) You can add any number of hidden files corresponding to one visible file.
e.g.
visible.txt:hide
visible.txt:hello
visible.txt:secrete
3) If file content of visible file is modified or deleted all the hidden files will be deleted :(.
Well, that's a big problem. Simplicity comes with price anyways.

Labels:

posted by GNUlihd @ 6:18 AM 0 comments

Filename con

Can you rename any of your file or folder to filename con?
Try the same with filename aux or nul. Try saving this webpage as con.html.

Quick googling will tell that these are the reserved filenames (character devices).
Do you remember using ‘copy con’ command in old DOS world as copy con test.txt?
con is for console and it simply copies ‘console input file’ to test.txt.
so,

copy test.txt con

is equivalent to
type test.txt

Another filename nul behaves like a file which is not.
It’s like a black hole :-) It swallows everything and nothing comes out.

e.g.
dir>nul
type nul

copy con nul
type nul

List of reserved filenames from wiki:

CON, PRN, AUX, CLOCK$, NUL
COM0, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9
LPT0, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9.

Labels:

posted by GNUlihd @ 6:02 AM 0 comments