Results 1 to 9 of 9
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Atlanta
    Posts
    568
    Thanks
    7
    Thanked 1 Time in 1 Post

    Batch File Does Not Work

    I am trying to convert a Win 98 system to 1Windows 2000. My main problem are some batch files that I need but which do not seem to work under NT. Specifically, DOS commands like:

    ATTRIB
    DELTREE

    that work fine under every version of DOS and every version of Windows through ME do not work in a batch file under Windows 2000. I can type the ATTRIB command from the command line just fine but not in a batch file. The DELTREE command does not even work from the command line. Suggestions?

    Ronny
    Ronny Richardson

  2. #2
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,577
    Thanks
    5
    Thanked 1,057 Times in 926 Posts

    Re: Batch File Does Not Work

    What happens when you use ATTRIB? Instead of DELTREE try RMDIR /S. Make sure that your user has permissions to do what you need.

    Joe
    Joe

  3. #3
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Atlanta
    Posts
    568
    Thanks
    7
    Thanked 1 Time in 1 Post

    Re: Batch File Does Not Work

    As far as I can tell, ATTRIB works just fine. Used alone it displays the file attributes and used with +A, it turns the archive bit on. I only use +A so I cannot say for sure that the other switches work. But then, I don't need them.

    Ronny
    Ronny Richardson

  4. #4
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,577
    Thanks
    5
    Thanked 1,057 Times in 926 Posts

    Re: Batch File Does Not Work

    You said the ATTRIB command does not work in a batch file. What happens? Any error? Or does it really work?

    Joe
    Joe

  5. #5
    Super Moderator
    Join Date
    Dec 2000
    Location
    Renton, Washington, USA
    Posts
    12,560
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Re: Batch File Does Not Work

    Are you in a 16 bit or a 32 bit command window?

    You need to be in the 16 bit.

    Now running HP Pavilion a6528p, with Win7 64 Bit OS.

  6. #6
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Atlanta
    Posts
    568
    Thanks
    7
    Thanked 1 Time in 1 Post

    Re: Batch File Does Not Work

    When I was trying to run them by hand, I was in a session that I started by clicking on Start, Run, Command. I also tried running them as a menu item. I'm new to 2000 so I don't know what kind of session that gave me.

    My system crashed and the IT department has it right now so I cannot try out anything else for a day or two until IT gets it back to me.

    Ronny
    Ronny Richardson

  7. #7
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,577
    Thanks
    5
    Thanked 1,057 Times in 926 Posts

    Re: Batch File Does Not Work

    Why does he need to be in the 16 bit shell? He can do whatever he needs in the 32 bit shell with more options, stability, & security.

    Joe
    Joe

  8. #8
    Super Moderator
    Join Date
    Dec 2000
    Location
    Renton, Washington, USA
    Posts
    12,560
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Re: Batch File Does Not Work

    Based on what I am reading, he is a new user and is using the "command line parameters" from his 9x batch files in the 32 bit cmd.exe mode.

    There is Command.com (MS DOS) and cmd.exe (Windows 32), each with their own command line parameters. These two files are in the Windows/system32 folder. If one is trying to use the standard DOS Commands with command line parameters, while in the cmd.exe mode things will NOT work properly.

    Also so, is this a NTFS system?

    Now running HP Pavilion a6528p, with Win7 64 Bit OS.

  9. #9
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newark, New Jersey, USA
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Batch File Does Not Work

    Are you specifying the entire path in the batch file??? I've seen it where if you don't, it does bomb... I know that the paths for these file are in the PATH statement, but for sh*ts and giggles, you may want to try that.
    Mike Wolfman
    Jack of all, Master of none
    Bow before me, for I am root.
    <IMG SRC=http://www.wopr.com/w3tfiles/112673-wolfsig.jpg>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •