1. Home >
  2. Apps >
  3. Groups >

How to convert .bat files into .txt files?

Question asked by parihar888 in #Programming #Linux on Jan 17, 2008
parihar888
parihar888 路 Jan 17, 2008
Rank E1 - BEGINNER

Hi聽,

How can we extract .bat files to .txt file 馃槙.

Posted in: #Programming #Linux
parihar888
parihar888 路 Jan 17, 2008
Rank E1 - BEGINNER
Let me know

HI ,
we can easily create batch files just saving the text in notepad with .bat xtension , but how can we get .bat file to .txt file???
LORD_EC
LORD_EC 路 Jan 17, 2008
Rank C3 - EXPERT
Re: Let me know

Right Click on the .Bat file and then use "open with" dialog to open it with Notepad.
Prasad Ajinkya
Prasad Ajinkya 路 Jan 21, 2008
Rank B1 - LEADER
rename the .bat extension to .txt? Will that not work??
viiper
viiper 路 Mar 21, 2008
Rank E1 - BEGINNER
Select 'Open with' option from the right click context menu and then choose "Choose Program". Select notepad from the list and then you can save the file in .txt form
friendster7
friendster7 路 Mar 22, 2008
Rank C1 - EXPERT
u can convert the .bat file into .txt file..by
selecting the .bat file right click>>properties>>openwith change to Notepad..
Sai s
Sai s 路 Dec 3, 2018
Rank E1 - BEGINNER

you can easily convert .bat to .txt by simply right clicking on the .bat file and select edit.From there copy the whole code and paste it into a new notepad and delete .bat file.

Yes!you are done........

Vinay Mishra
Vinay Mishra 路 Jan 13, 2020
Rank B2 - LEADER

You can do it by several methods.

1) Simply change the extension of file from .bat to .txt (if it ask for permission with a warning, allow it).

2) Copy the whole content from .bat file and paste it in a new .txt file.

3) There are some platforms available on internet where you can just drop your .bat file and it will get converted into any extension you want. For example: The world's largest computer file extension library with detailed explanation of each file type with links to associated software programs.

Teja Reddy
Teja Reddy 路 Jan 16, 2020
Rank C3 - EXPERT

Batch files(.bat) are already text files you don't have to convert them manually if u wish to open u can directly see using text editor but if want to convert then it's very simple just rename file from .bat to .txt extension that's it.

Karshil Sheth
Karshil Sheth 路 Jan 26, 2020
Rank C2 - EXPERT

I use online software on google and duck duck go. There are multiple sites which can convert any type of file into specific format you like. One such website I use is:- https://www.file-extensions.org/

Swarup Pan
Swarup Pan 路 Jan 26, 2020
Rank C2 - EXPERT

There are a lot of ways to do it.

1. Open the file with notepad and save as it.txt

2. Right click on the file and go to properties, advanced option and then change it.

3. Rename the file with.txt extension.

4. Right click on the file, open with, select notepad, check the always box.

5. Copy the entire element of that file and paste it over a new text file and then save it.

Durgesh Srivastava
Durgesh Srivastava 路 Feb 17, 2020
Rank C1 - EXPERT

Open a new Notepad file. You can also use any similar text file editor, like Notepad++.

Type the following commands in the text file:

Save the text file with the extension .bat instead of .txt. For instance, testbatch.bat in my case.

To Run the batch file, simply double-click it. The CMD Window will open automatically with the desired output.

Noothan Kumar
Noothan Kumar 路 Feb 22, 2020
Rank C1 - EXPERT
  • You need to scan for links in the txt file, search for regular expression matching
  • You need a http client to fetch the link, if you are in powershell, lookup curl, else use python and its http library
  • You need to open and close that file periodically, and to do that, write a loop in your script, or use task scheduler.

Also, Learn python, it is worth the effort and will be at worst having the same learning curve as batch script.

You must log-in or sign-up to reply to this post.

Click to Log-In or Sign-Up