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.

Solved: Echo is off.

Discussion in 'Software Development' started by 1Nation, Aug 24, 2009.

Thread Status:
Not open for further replies.
Advertisement
  1. 1Nation

    1Nation Thread Starter

    Joined:
    Aug 24, 2009
    Messages:
    4
    I write alot of batch programs because I am an avid Windows NT/98/95/2k Developer. I was on my Win2k desktop and wrote up a fresh batch to clean up temp files and I have written.

    @echo off
    echo Hello, this will clean your windows Temp folder and save you some disk space.
    pause
    Del C:\WINDOWS\Temp
    echo .
    echo .
    echo .
    echo Success
    echo You should now have some extra disk space!
    pause

    But upon running the bat it performs the action but the first echo command after @echo off simply says ECHO is off. rather that what I want it to say everything else displays properly what's going on?
     
  2. Squashman

    Squashman Trusted Advisor

    Joined:
    Apr 4, 2003
    Messages:
    19,783
    Strange. It is just the first echo cmd that doesn't work and it doesn't echo any of the output of the delete cmd?

    I just copied and pasted your code directly and it worked fine. You sure you don't have some extraneous tabs or something else in there. I would open it in notepad++ and turn on all characters to see if there is something in there.
     
  3. 1Nation

    1Nation Thread Starter

    Joined:
    Aug 24, 2009
    Messages:
    4
    Well I believe I've solved it I was saving it as Temp Cleaner.bat upon opening the batch file then saving it as Temporary Files Cleaner.bat it runs normally. I don't know what went wrong.
     
  4. TheOutcaste

    TheOutcaste

    Joined:
    Aug 7, 2007
    Messages:
    9,028
    I've had a couple of weird things similar to this. Don't know why, but closing all windows, then re-opening usually fixes it. Seems like the command prompt is using a copy of the file cached in memory, which gets corrupted somehow, and never notices that the file gets edited or changed, so never reloads the new version.
     
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/855102

  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