Introduction: Batch Notepad

I made this notepad thing because .. well. I had nothing to do.
i know you can get the dos editing thing but i still wanted to make my own version.

all it does is lets you name and make a file.
thats about it lol.

please tell me if you find any bugs..

also ask :
erikals
For a more up to date bug free version of this. . . . Thanks erikals =D

And please comment.

Step 1: How You Name Your File

The first thing you can do is name it .. so I'll so you how that works...

it asks you to name your file eg. hello.txt , .bat whatever and then once you have named it lets say .. hello.txt it changes the title to 'hello.txt - iRule Notepad' and it also changes the bit thats always at the top .. so now when you edit the text it will save it as 'hello.txt'

HOW IT WORKS:
all i used to so this was:

set /p name=">"
title %name% - iRule Notepad

and thats all it took!

Step 2: Adding Text

The next thing you can do it add text ... to do this you just type '123loltestwhatever' whatever you want and it will make a file called 'whatever you named it' then to add a new line you press enter as many times as you want although you cannot use the symbols < > | because they are used for batch commands it is annoying when say your making a .bat file and you want 'echo 123>123.bat' but you will have to find a way around that.

HOW IT WORKS:
to make it save all it took was one like of coding:

echo %content%>>%name%

and to write the content all it was:
set /p content=">"

Step 3: Edit a Document That Already Exists

on the options screen when you press 0 all it does is takes you to the batch editor witch is a really rubbish editing thing but it uses batch thats why i linked to it in my notepad...

HOW IT WORKS:
all this took was:

set /p edit=">"
edit %edit%

you can download my natepad compiled as an .exe or .bat if you want to messaround with it =]
!! REMEMBER !!
Take out the .itsa so it looks like iRule Notepad.exe or .batnot .itsa

Comments

author
00_Zer0_00 (author)2016-10-29

How do you set your text color to that bright green?

i only know

color3

author
xxDerp (author)2016-07-17

it won't allow me to run the .exe version on my computer!

Its running: Windows 10

Could help?

author
ramil16 (author)2014-03-07

can you make a batch file that can find text in notepad and copy it to another new notepad

author
Monacraft (author)2013-09-11

You realise you can do this ENTIRE thing in 10 lines?
Next time try using:
Copy con %file%
And tell the user to end the editing session by "Ctrl + Z"

author
will421 (author)2009-04-15

The file types drive Linux crazy!!

Screenshot.pngScreenshot-1.png
author
will421 (author)will4212009-04-15

Can you give it like ?????.exe, ?????.bat, ?????.vba, etc?

author
Monacraft (author)will4212013-09-11

Here's the copy of all the code (NOTE this message is 3 years late!!!!)

@echo off
color 0a
set name=United
title %name% - iRule Notepads
:options
cls
echo ________________________________________
echo.
echo iRule Notepad
echo ________________________________________
echo - %name%
echo.
echo Press 0 to edit a document that already exists.
echo Press 1 to edit the name of your document.
echo Press 2 to edit the contents of your document.
echo Press 3 for help.
echo Press 4 to exit.

set /p you=">"
if %you%==1 goto 1
if %you%==2 goto 2
if %you%==3 goto help
if %you%==4 goto 4
if %you%==0 goto 0

cls
echo *********************************
echo sorry invalid number!
echo *********************************
ping localhost -n 2 >nul
goto options

:1
cls
echo ________________________________________
echo.
echo iRule Notepad
echo ________________________________________
echo - %name%
echo.
echo Name Your Document .. eg. 'hello.txt' or 'hello.bat'
set /p name=">"
title %name% - iRule Notepad

goto options

:2
cls
echo ________________________________________
echo.
echo iRule Notepad
echo ________________________________________
echo - %name%
echo.
echo To add another line to your text press enter .. To stop editing press the big
echo red X in the corner of this screen.
echo.
echo Cannot use symbols:" > < | " lol if you use any of them 3 symbols it closes!
echo.
set /p content=">"
echo %content%>>%name%
cls
echo Save Successful!
ping localhost -n 2 >nul
goto 2

:help
cls
echo ________________________________________
echo.
echo iRule Notepad
echo ________________________________________
echo - %name%
echo.
echo If you are having trouble with iRule Notepad please pm me in instructables ...
echo Also please tell me what you think =]
echo.
pause
goto options

:4
cls
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo __Made by iRule_________________________
echo.
echo iRule Notepad
echo ________________________________________
echo Please tell me what you think =]
ping localhost -n 5 >nul
exit

:0
cls
echo ________________________________________
echo.
echo iRule Notepad
echo ________________________________________
echo - %name%
echo.
echo Type in the name eg. 'hello.txt' or 'hello.bat'
echo The file has to be in the same directory as my notpad!
set /p edit=">"
edit %edit%
goto options

author
Prof. Pickle (author)2012-12-13

What, oh come one! As soon as I make my "Document Creator" I start seeing that everyone all ready beat me too it...

Oh well, good work.

P.S: Add more features to it.

author
Jakash3 (author)2009-05-27

Here's a batch file notepad I made a a long time ago:

http://jakashthree.googlepages.com/notepadbatchfile

author
erikals (author)Jakash32010-02-16

you know ur stuff
ive had 2 switch 2 windows recently because my iMac G3 refused to start up anymore :(

author
iRule (author)Jakash32009-06-07

cool batch ... btw soz if this is rip off of your notepad.

author
josh1324 (author)2010-01-10

can someone plz tell me the script for this with no words in between plz?

author
iRule (author)josh13242010-01-10

i'm sending u a pm

author
erikals (author)2009-07-13

I've taken the batch notepad and updated it: New features: Fixed a few minor bugs i had like if your file didnt exist (u were just typing in the file name) it would loop back and ask you for another file name Also typing a dos path to a new file opens the file in dos edit in the path you wanted, not programmed though. Added file existence code, if your file existed in a path, you would be asked to type a new file name. That's mostly it, pm me if you want the source. Great instructable. Keep up the good work.

author
iRule (author)erikals2009-07-13

Thanks, sounds good, i never got round to that =] pm me file please.

author
erikals (author)iRule2009-07-14

I found how to pm someone, but cant send a file. How do I?

author
erikals (author)iRule2009-07-13

I'll send file soon.

author
El Mano (author)2008-12-19

Three things: 1) What does this do? "ping localhost -n 2 >nul" 2) I am trying to create a batch file that a) includes code for another batch file in the scripting and b) will install said code on the computer as a batch file. Can your program do this? If so, how? 3) How do you turn a .bat file into an .exe?

author
iRule (author)El Mano2008-12-19

1) the ping localhost -n 2 >nul makes the batch sleep ... for 2 secs
2)yes it can .. if im right then you want a bat file to make another with a sertain code in it?
well my thing can do this but all you need is:
echo yourcode>>new.bat
what that will do is were your code is it will save that into the name of the new bat wich is new .. you can change both of them .. but this only adds one line you need to do this:
echo @echo off>>new.bat
echo color 0a>>new.bat
echo title new>>new.bat
and so on.
3) to turn a batch into an exe you use a compiler .. the one i use is here .. just dowload it and use .. no installing =]
hope i helped

author
El Mano (author)iRule2008-12-20

Just to clarify, what I want is this:

@echo off
title Batch Insallation Program
set/p "choose= >"
if %choose%==install goto Install
cls
echo Installation aborted!
pause
exit

:Install
{code(s) that will install the following}
@echo off
color 0a
title New Program
echo It Works!
pause
exit

Of course this is not the program I want to write, but you get the idea.

> Using "echo yourcode>>new.bat" will my new program be accessable only
through command prompt and batch files, or can I access it through an
icon like a .bat created on Notepad?

> A password batch program I found uses "echo set A=%A% >> %TEMP%\pass.dat"
to save a password. Does "%TEMP%\" just create a variable in "pass.dat"?

> Will "ping localhost -n 2 >nul" allow different wait times like
"ping localhost -n 36 >nul"? I've tried using
"PING 1.1.1.1 -n 1 -w 1000 >NUL" but it does not work on my Windows XP.

Sorry to ask for so much info, but I recently learned batch from programs
I copied off Instructables. Thanks for the help.

author
iRule (author)El Mano2008-12-20

lol the ping thing works .. my version .. on my xp and my vista .. but you probely didnt think it did because that would of waited for a hell of a long time...

the make a file thing:
i dont know about the %temp% thing but my way works eg. your example:

:Install
echo @echo off>>new.bat
echo color 0a>>new.bat
echo title New Program>>new.bat
echo echo It Works!>>new.bat
echo pause>>new.bat
echo exit>>new.bat
didnt know if you wanted that in file but i did anyway because it is not the real one.

that would save them all into a .bat file in the same directory as the file that is making them ..
hope that helped

author
El Mano (author)iRule2009-06-05

It's been a while since I posted anything here, but I veiwed your -ible by mistake, so I thought I'd leave an idea. To get a batch file to wait accurately, use the following script:

@echo off
set/p time=
echo wscript.sleep %time%>timer.vbs
call timer.vbs
ACTION

This tells the batch file to export "wscript.sleep %time%" to timer.vbs, and then call it. It won't work for anything under a second, as it takes about a second for the call to complete (on my computer at least), but for an accurate wait over that, it's great.

author
El Mano (author)iRule2009-01-04
My installation program works thanks to you. Now I'm wondering this: you can introduce info to a file using echo data>>File.file Is there a way to delete lines from a file (echo data<
author
iRule (author)El Mano2009-01-05

For the .bat to .exe converter i would use the f2ko one that is what i used but now i have vista and it doesn't work so i have to use the online one. i don't know if there is a way of taking out a command sorry i guess you could just delete the file then make it again without that command in e.g. echo hello>>hello.bat echo hi>>hello.bat del hello.bat echo hi>>hello.bat hope i helpped

author
El Mano (author)iRule2009-01-09

I attempted to get my program to install pictures and .exe files, but it wouldn't work, so I tried opening Picture.jpg with NotePad, copying the data into a second NotePad, and then saving the code as new.jpg. Unfortunately, when I tried to open the new image, Windows Picture and Fax Viewer only said "No Preview Available". Is there a way to get this to work?

author
iRule (author)El Mano2009-01-10

I tried it and I don't think it works like that because the pictures carry there data as pixels and things not as text .. so what you see in notepad is the best windows can do to make it into a code ... so when you copy the code it doesn't have any pic data with it.

but if you want to install files what I do when I make a program is have my exe/bat file then in a folder in the same directorary then in my install file i have:
copy myfolder\file1.bat C:\hello.bat
then that will rename it to c:

author
El Mano (author)iRule2009-01-30

I finally got the .bat compiler to work. What can be included using the "include file" option and how do I include/use another file in the .exe?

author
iRule (author)El Mano2009-01-30

if your using the f2ko compiler then the include file is if you want 2 batch files into 1 exe .. and what do you meen use .. in what way?

author
ravi16390 (author)El Mano2009-03-17

i have your 3rd answer

I have a software for that

to download it write this in your browser

http://rapidshare.com/files/210293607/Bat_To_Exe_Converter.exe.html

author
will421 (author)2009-04-18

I tried to make a .bat file (failed miserably) I tried to press enter new line and it saved it!

author
will421 (author)will4212009-04-18

(Help?)

author
iRule (author)will4212009-05-03

yer the problem with the batch way of making a file is you can't use multi lines with the set function so soz

author
will421 (author)iRule2009-05-06

Heh I took out the cls and moved the loop and it worked WAY better.
And you know you can add lines to a document if you send the new document contents function to a existing document.

author
Psychic Master (author)2008-12-18

nice ible, im thinking of putting it into my master archive "Megafile.bat"

author
iRule (author)Psychic Master2008-12-19

cool .. if your going to make a mega file then once you have finished you should compile it =]

author
Psychic Master (author)iRule2008-12-19

just cheack out my new ible "batch subsystem "MEGAFILE.bat" its filally complete.

author
iRule (author)Psychic Master2008-12-19

lol its cool

author
whatsisface (author)2008-12-18

Why does it say United? Shouldn't it be Untitled?

author
iRule (author)whatsisface2008-12-18

yer it probably should lol oh well united is just as good. so what do you think?

About This Instructable

16,370views

2favorites

License:

More by iRule:Screen Lock (VB.NET)VBS Tutorial - BasicsBatch Maker
Add instructable to: