Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

dos question 3

Status
Not open for further replies.

hotiron

Mechanical
Nov 16, 2007
79
Hi all,
I'm creating a batch file to empty Temp and backup folders, as I've always done. When renaming the created batch to .bat, the .txt extension remains, not allowing the file to execute. ex. filename.bat.txt?? Never seen this before. Any suggestions? Thanks
 
Replies continue below

Recommended for you

Hotiron,

Are you working in WinXP? If so, files that used to be *.bat files must how be *.cmd


Regards,
Mike Tompkins
 
miket000. Thanks for the post.
Changing the extension to .cmd has no effect. Double clicking on the file or shortcut opens the file for edit. I believe the last place I was at was using XP as well. I used .bat extensions there with no problem(?)Also, when renaming .txt files to .bat(or .cmd) shouldnt i get a message asking if I relly want to do this?
 
Tty opening Windows Explorer, then select Tools -> Options -> View and clear the checkbox labeled "Hide extensions for known file types".

Eric
 
After doing what EEnd described, in NotePad you have to change the SaveAs Type to *.*

Then add the .bat extension with the filename.

Ken
 
Thanks for the help,
I forgot to unhide file extensions. Stars to all
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor