The expand command is used to expand one or more compressed files. For the specific usage, please look at expand /?
Everyone, try executing the following command under cmd: cd c:\ &>a.txt echo test &expand a.txt b.txt:bb &del a.txt
Now go to c:\ and see, there is an additional b.txt, and then it is found to be an empty file. The a.txt just now was obviously not an empty file. Why is it expanded to b.txt as an empty file? That's strange! Hehe
Okay, now to restore a.txt, execute: cd c:\ &expand b.txt:bb a.txt
Now see, isn't it restored again? The content of a.txt is exactly what we just wrote in with echo
Okay, now let's use this
We use it to "encrypt" files
Execute: expand source file target file:**, ** can be written randomly (I only tested writing letters). After encryption, delete the source file, so that others can't see the source file no matter what
When we need to "decrypt" the file
Execute: expand target file:** source file, just note that ** must be exactly the same as the ** used in "encryption", otherwise it can't be "decrypted"
Also, directly executing: expand target file source file is not okay
Hehe, is it easy to use? Is it practical? After testing, it can be used completely. Changing the name of the new file, copying the new file to other paths, restarting the system, etc., have no impact
Question: Why is it an empty file? How can it be restored with an empty file? I don't understand, hope the experts can explain
Everyone, come and discuss~
[ Last edited by he200377 on 2006-9-26 at 08:00 ]
Everyone, try executing the following command under cmd: cd c:\ &>a.txt echo test &expand a.txt b.txt:bb &del a.txt
Now go to c:\ and see, there is an additional b.txt, and then it is found to be an empty file. The a.txt just now was obviously not an empty file. Why is it expanded to b.txt as an empty file? That's strange! Hehe
Okay, now to restore a.txt, execute: cd c:\ &expand b.txt:bb a.txt
Now see, isn't it restored again? The content of a.txt is exactly what we just wrote in with echo
Okay, now let's use this
We use it to "encrypt" files
Execute: expand source file target file:**, ** can be written randomly (I only tested writing letters). After encryption, delete the source file, so that others can't see the source file no matter what
When we need to "decrypt" the file
Execute: expand target file:** source file, just note that ** must be exactly the same as the ** used in "encryption", otherwise it can't be "decrypted"
Also, directly executing: expand target file source file is not okay
Hehe, is it easy to use? Is it practical? After testing, it can be used completely. Changing the name of the new file, copying the new file to other paths, restarting the system, etc., have no impact
Question: Why is it an empty file? How can it be restored with an empty file? I don't understand, hope the experts can explain
Everyone, come and discuss~
[ Last edited by he200377 on 2006-9-26 at 08:00 ]
