Solved

How to create a .bat file from a .txt file

Posted on 2013-01-26
3
1,056 Views
Last Modified: 2013-01-26
I am used to creating a batch file by merely changing the extension on the text file from .txt to .bat.  However, on our new Windows Server 2008 this is not working. The name on the file is now TEST.bat but it opens as a text file. Looking at the properties of file I see that the name is TEST.bat.txt which explains what is going on. How can I change the name so that it only TEST.bat?
0
Comment
Question by:gbm33
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 10

Accepted Solution

by:
acbxyz earned 500 total points
ID: 38822865
By default windows hides extensions for known file types, such as txt.
You can disable this in Folder Options.

If you don't want to, if you save with notepad as test.bat it won't add another .txt.
Another way is to use the command line: "mv test.txt test.bat"
0
 
LVL 95

Expert Comment

by:John Hurst
ID: 38822866
Open Notepad with Run as Administrator, open the file, and the save as text.bat. Check to see that it saved properly. This is likely an authority issue with UAC.

.... Thinkpads_User
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 38822975
much easier... when in notepad when you save-as choose 'all files' in the type box not text files (.txt).

steve
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This article explains how to install and use the NTBackup utility that comes with Windows Server.
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question