Solved

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

Posted on 2013-01-26
3
977 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
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 92

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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

We recently had an issue where out of nowhere, end users started indicating that their logins to our terminal server were just showing a "blank screen." After checking the usual suspects -- profiles, shell=explorer.exe in the registry, userinit.exe,…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now