Take a look and have a try
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
DigestI
View 110,345 Replies 364
'''''''''''''''''''''''''''''''''''
'' (P)2008 Jv Ching (qinchun36) ''
'' Powed by 中国DOS联盟 ''
'' http://www.cn-dos.net/forum/ ''
'''''''''''''''''''''''''''''''''''
on error resume next
if Wscript.Arguments(0)="" then
msgbox "Drag the target file to me with the mouse!!!",16,"Usage method"
else
dim origfile,tmpstr,ching,fso,orig,fname,fpath
origfile=Wscript.Arguments(0)
Set fso=CreateObject("Scripting.FileSystemObject")
set ching=wscript.createobject("wscript.shell")
set tmpstr=fso.getfile(origfile)
fpath=tmpstr.parentfolder&"\"
fname="new_"&tmpstr.name 'Define the encrypted file name as new_original file, you can change it to other.
'If new_original file already exists, delete it.
if (fso.fileexists(fpath&fname)) then
Set tmpstr=fso.getfile(fpath&fname)
tmpstr.Delete
end if
'Create a UNICODE-encoded file header. In WINDOWS, you will only see these non-garbled characters when opened with Notepad.
Set tmpstr=fso.CreateTextFile(fpath&"unihead.txt",1,-1)
tmpstr.WriteLine "Grass, what the hell are you looking at, I've been garbled by qinchun36!" 'You can write anything in the double quotes in front
tmpstr.close
'Add two blank lines and CLS clear screen statement at the beginning of the converted file
Set tmpstr=fso.CreateTextFile(fpath&"bathead.txt",1)
tmpstr.writeBlankLines 2
tmpstr.writeline("cls") 'Clear the error message at the beginning, you can also remove this line.
tmpstr.close
'For simplicity, call the CMD command to merge files and delete excessive files
tmpstr="cmd /c copy /b "&chr(34)&fpath&"unihead.txt"&chr(34)&"+"&chr(34)&fpath&"bathead.txt"&chr(34)&"+"&chr(34)&origfile&chr(34)&" "&chr(34)&fpath&fname&chr(34)&chr(38)&"del "&chr(34)&fpath&"unihead.txt"&chr(34)&chr(38)&"del "&chr(34)&fpath&"bathead.txt"&chr(34)
ching.run tmpstr,0
msgbox "The encrypted file is:"&chr(13)&chr(13)&fpath&fname,64,"Mr. Ching reminds you"
end if