XP Batch: "@ECHO OFF" doesn't work?

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

nanomir

Thread Starter
Joined
Oct 7, 2008
Messages
5
Hi,

sorry if I missed the appropriate forum - please move the post if necesarry..

Well, this is the first time I encounter this on XP - it seems as if @echo off stopped working, and will not work in a batch file - and instead of the commands in the batch file executing, they are simply printed at output? Example batch file, test.bat:
Code:
@ECHO OFF
dir
executing this, I get:
Code:
F:\>test.bat
OFFdir
Tried restarting the command prompt a couple of times, it didn't help (haven't tried restarting the PC yet - edit: did restart it, no help). Maybe I should mention that this is a fresh XP reinstall, after a serious crash of the previous hard drive - I haven't encountered this problem previously. Does anyone have any idea what might cause this?

Thanks...
 

nanomir

Thread Starter
Joined
Oct 7, 2008
Messages
5
think I solved it thanks to: MOVE command does not work from . BAT or .CMD script

tried to run
Code:
F:\>command /c test.bat
Bad command or file name
Then I checked using Notepad++ what is the encoding format - it had shown Mac (!!) - changed that to Windows... then finally did

Code:
F:\>cmd
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

F:\>test.bat

F:\>ECHO OFF
 Volume in drive F is fdrive
 Volume Serial Number is 4888-2B88

 Directory of F:\

10/07/2008  02:49 PM                15 test.bat
so I guess it works now..

Still have no idea what caused it - possibly the Mac encoding corrupted the actively running cmd..
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top