中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-12 21:04
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS批处理 & 脚本技术(批处理室) » Batch Processing to Realize Folder Encryption (Original)
Printable Version  1,930 / 6
Floor1 pooloo Posted 2009-07-05 08:40
初级用户 Posts 33 Credits 62
Can realize the encryption function of similar software on the market. As for things like King Kong encryption, I won't mention it——It takes too much time to encrypt file contents with the MD5 encryption algorithm, which is not as good as using WinRAR encryption.

The code for file encryption.bat is as follows:

@echo off
md RECYCLER55
:: Can create any directory similar to RECYCLER55 (of course, you can also take other names, but you have to modify RECYCLER55 accordingly later)
echo [.ShellClassInfo] > RECYCLER55\desktop.ini
echo CLSID={645FF040-5081-101B-9F08-00AA002F954E} >> RECYCLER55\desktop.ini
attrib RECYCLER55 +s +h
md \\.\%CD%RECYCLER55\MICROSOFT-7701091-6666888-16826688...\
:: Can create any deformed directory similar to MICROSOFT-1234567-1234567-12345678...\
cls
:: The above code creates a special directory

echo Please drag the folder to be encrypted and press Enter
echo (It is best that the folder is in the root directory and the folder name has no spaces):
set /p scrfile=
cls
md %scrfile%_bak
move %scrfile% %scrfile%_bak
for %%i in ("%scrfile%") do ren \\.\%CD%%%~ni_bak\%%~ni com9.{21EC2020-3AEA-1069-A2DD-08002B30309D}
:: The above code creates a directory 'the name of the directory to be encrypted_bak', then cuts the directory to be encrypted into it and renames it to the special directory name

:: echo The following is to cut the folder %scrfile%_bak into the opened folder
move %scrfile%_bak "%CD%RECYCLER55\MICROSOFT-7701091-6666888-16826688....\"
:: Note: When moving under XP above, MICROSOFT-7701091-6666888-16826688....\ has 4 dots. If there is one less dot, it will prompt that the path is not found
move %scrfile%_bak "%CD%RECYCLER55\MICROSOFT-7701091-6666888-16826688...\"
:: Note: When moving under Vista above, MICROSOFT-7701091-6666888-16826688....\ has only 3 dots. If there is one more dot, it will prompt that the path is not found
echo Encryption completed!

Next time I will post the decryption folder.bat
Floor2 radem Posted 2009-07-05 10:44
高级用户 Posts 383 Credits 691
%cd%\
Floor3 qinchun36 Posted 2009-07-06 07:03
高级用户 Posts 400 Credits 609
Floor4 xiaofengtoo Posted 2009-08-17 07:57
新手上路 Posts 1 Credits 1
Sweat Modify the file path...............
Floor5 jarry0932 Posted 2009-10-10 21:40
初级用户 Posts 122 Credits 128
Is it more secure to use "%cd%"...
Floor6 cj000 Posted 2009-10-20 09:21
新手上路 Posts 9 Credits 10
The code makes my eyes dizzy.
Floor7 sfcctv Posted 2009-11-16 23:04
中级用户 Posts 135 Credits 208 From 离恨天
L楼主,你这是老生常谈了。
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023