- Batch File Text Encrypt/Decrypt. By Blurryface21 in Technology. All you gotta do is copy and paste the below code into a notepad file, and save it as anything.bat.
- How to Encrypt a Batch File 1. Expand the Windows 7 Start menu and click 'Computer' to launch the native file manager. Use the file manager to locate the batch file. Batch files have a BAT extension. Right-click the batch file and select 'Properties' from the resulting menu.
Copy this code into notepad and save it as Encryt.bat or anything else with the .bat file extension
@echo off
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
title Encrypt
color a
:mainmenu
set savefile=on
::set Encrypt=Nothing
(set CHAR[a]=UDFM45) & (set CHAR[b]=H21DGF) & (set CHAR[c]=FDH56D) & (set CHAR[d]=FGS546) & (set CHAR[e]=JUK4JH)
(set CHAR[f]=ERG54S) & (set CHAR[g]=T5H4FD) & (set CHAR[h]=RG641G) & (set CHAR[i]=RG4F4D) & (set CHAR[j]=RT56F6)
(set CHAR[k]=VCBC3B) & (set CHAR[l]=F8G9GF) & (set CHAR[m]=FD4CJS) & (set CHAR[n]=G423FG) & (set CHAR[o]=F45GC2)
(set CHAR[p]=TH5DF5) & (set CHAR[q]=CV4F6R) & (set CHAR[r]=XF64TS) & (set CHAR[s]=X78DGT) & (set CHAR[t]=TH74SJ)
(set CHAR[u]=BCX6DF) & (set CHAR[v]=FG65SD) & (set CHAR[w]=4KL45D) & (set CHAR[x]=GFH3F2) & (set CHAR[y]=GH56GF)
(set CHAR[z]=45T1FG) & (set CHAR[1]=D4G23D) & (set CHAR[2]=GB56FG) & (set CHAR[3]=SF45GF) & (set CHAR[4]=P4FF12)
(set CHAR[5]=F6DFG1) & (set CHAR[6]=56FG4G) & (set CHAR[7]=USGFDG) & (set CHAR[8]=FKHFDG) & (set CHAR[9]=IFGJH6)
(set CHAR[0]=87H8G7) & (set CHAR[@]=G25GHF) & (set CHAR[#]=45FGFH) & (set CHAR[$]=75FG45) & (set CHAR[*]=54GDH5)
(set CHAR[(]=45F465) & (set CHAR[.]=HG56FG) & (set CHAR[,]=DF56H4) & (set CHAR[-]=F5JHFH) & (set CHAR[ ]=SGF4HF)
(set CHAR[]=45GH45) & (set CHAR[/]=56H45G)
echo Enter a string to encrypt:
set /p Encrypt=
cls
set Encrypt2=%Encrypt%
set 'EncryptOut='
:encrypt2
set char=%Encrypt2:~0,1%
set Encrypt2=%Encrypt2:~1%
set EncryptOut=%EncryptOut%!CHAR[%char%]!
if not '%Encrypt2%'' goto encrypt2
echo Input string: %Encrypt%
echo.
echo Output string: %EncryptOut%
set string=%EncryptOut%
set temp_str=%string%
set str_len=0
:lengthloop
if defined temp_str (
set temp_str=%temp_str:~1%
set /A str_len += 1
goto lengthloop )
echo.
echo Output string is %str_len% characters long!
if '%savefile%'on' echo.%EncryptOut%>>%~d0%~p0encrypted.txt
echo.
start http://forum.imgburn.com/index.php?/topic/21566-batch-encryption-working/
pause
cls
goto mainmenu
@echo off
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
title Encrypt
color a
:mainmenu
set savefile=on
::set Encrypt=Nothing
(set CHAR[a]=UDFM45) & (set CHAR[b]=H21DGF) & (set CHAR[c]=FDH56D) & (set CHAR[d]=FGS546) & (set CHAR[e]=JUK4JH)
(set CHAR[f]=ERG54S) & (set CHAR[g]=T5H4FD) & (set CHAR[h]=RG641G) & (set CHAR[i]=RG4F4D) & (set CHAR[j]=RT56F6)
(set CHAR[k]=VCBC3B) & (set CHAR[l]=F8G9GF) & (set CHAR[m]=FD4CJS) & (set CHAR[n]=G423FG) & (set CHAR[o]=F45GC2)
(set CHAR[p]=TH5DF5) & (set CHAR[q]=CV4F6R) & (set CHAR[r]=XF64TS) & (set CHAR[s]=X78DGT) & (set CHAR[t]=TH74SJ)
(set CHAR[u]=BCX6DF) & (set CHAR[v]=FG65SD) & (set CHAR[w]=4KL45D) & (set CHAR[x]=GFH3F2) & (set CHAR[y]=GH56GF)
(set CHAR[z]=45T1FG) & (set CHAR[1]=D4G23D) & (set CHAR[2]=GB56FG) & (set CHAR[3]=SF45GF) & (set CHAR[4]=P4FF12)
(set CHAR[5]=F6DFG1) & (set CHAR[6]=56FG4G) & (set CHAR[7]=USGFDG) & (set CHAR[8]=FKHFDG) & (set CHAR[9]=IFGJH6)
(set CHAR[0]=87H8G7) & (set CHAR[@]=G25GHF) & (set CHAR[#]=45FGFH) & (set CHAR[$]=75FG45) & (set CHAR[*]=54GDH5)
(set CHAR[(]=45F465) & (set CHAR[.]=HG56FG) & (set CHAR[,]=DF56H4) & (set CHAR[-]=F5JHFH) & (set CHAR[ ]=SGF4HF)
(set CHAR[]=45GH45) & (set CHAR[/]=56H45G)
echo Enter a string to encrypt:
set /p Encrypt=
cls
set Encrypt2=%Encrypt%
set 'EncryptOut='
:encrypt2
set char=%Encrypt2:~0,1%
set Encrypt2=%Encrypt2:~1%
set EncryptOut=%EncryptOut%!CHAR[%char%]!
if not '%Encrypt2%'' goto encrypt2
echo Input string: %Encrypt%
echo.
echo Output string: %EncryptOut%
set string=%EncryptOut%
set temp_str=%string%
set str_len=0
:lengthloop
if defined temp_str (
set temp_str=%temp_str:~1%
set /A str_len += 1
goto lengthloop )
echo.
echo Output string is %str_len% characters long!
if '%savefile%'on' echo.%EncryptOut%>>%~d0%~p0encrypted.txt
echo.
start http://forum.imgburn.com/index.php?/topic/21566-batch-encryption-working/
pause
cls
goto mainmenu
Related Articles
Batch or script for encrypting txt files. By sujitgates on Jul 1, 2011 at 06:09 UTC. General Windows. Next: Anyone ever use this. Hi all,i want to create a batch file which will encrypt the txt files and copy it to one location to other in win xp?any suggestion. So basically when you encrypt your text you need to give the other person the password and the decryption batch file. Until that nothing to worry about. But the program needs a new 'encryption code' every time like 'XXXXX belongs to the letter a'. Now I have two problems.
- 1 Encrypt File Names
- 2 Convert Documents From Windows XP to Windows 7
- 3 Deactivate the Proxy Server
- 4 Change the Monitor Resolution on a PC
![Encrypt bat file Encrypt bat file](/uploads/1/2/6/0/126083689/509223488.png)
Batch files have a BAT extension and, somewhat similarly to executable files, are used to run system commands through the Windows Command Prompt. Unlike an executable file, a batch file can be opened in any text editor, making it easy to copy or modify. To protect the contents of your batch file, you must encrypt it using the native Windows 7 Encrypting File System.
1.Expand the Windows 7 Start menu and click 'Computer' to launch the native file manager.
2.Use the file manager to locate the batch file. Batch files have a BAT extension.
3.Right-click the batch file and select 'Properties' from the resulting menu.
![Bat Bat](/uploads/1/2/6/0/126083689/934247565.jpg)
Click the 'Advanced' button to open the Advanced Attributes window.
6.Place a check mark in front of the 'Encrypt Contents to Secure Data' option to enable data encryption.
7.Click 'OK' and then 'Apply' to apply the changes and encrypt the batch file.
About the Author
Kirk Bennet started writing for websites and online publications in 2005. He covers topics in nutrition, health, gardening, home improvement and information technology.
Photo Credits
- Hemera Technologies/AbleStock.com/Getty Images
Choose Citation Style
Encrypt Text File With Password
Bennet, Kirk. 'How to Encrypt a Batch File.' Small Business - Chron.com, http://smallbusiness.chron.com/encrypt-batch-file-39813.html. Accessed 27 August 2019.
Bennet, Kirk. (n.d.). How to Encrypt a Batch File. Small Business - Chron.com. Retrieved from http://smallbusiness.chron.com/encrypt-batch-file-39813.html
Bennet, Kirk. 'How to Encrypt a Batch File' accessed August 27, 2019. http://smallbusiness.chron.com/encrypt-batch-file-39813.html
Note: Depending on which text editor you're pasting into, you might have to add the italics to the site name.