1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

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

Discussion in 'Windows XP' started by nanomir, Oct 7, 2008.

Thread Status:
Not open for further replies.
  1. nanomir

    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...
     
  2. nanomir

    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..
     
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 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/756890

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice