Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: newbish problem  (Read 2351 times)

0 Members and 1 Guest are viewing this topic.

theholygod

  • Guest
newbish problem
« on: March 24, 2006, 10:01:26 AM »
Hi guys,
this problem is probably very simple and im gonna get laughed off the forum on my first post!

anyhow, im playing around with a BAT file im writing from scratch which will open when i turn on my computer. This BAT file, in turn is going to open all the programs i usually open manually (email, etc).

my problem, however, is that when i try to open a directory with a space in the name (eg. "program files") dos complains that the directory ("C:\program") does not exist.

how do i go about making a space without breaking directory name?


Dilbert

  • Moderator


  • Egghead

  • Welcome to ComputerHope!
  • Thanked: 44
    Re: newbish problem
    « Reply #1 on: March 24, 2006, 01:59:50 PM »
    I've never heard of DOS complaining about directory names having spaces. However, the syntax for editing a file with spaces is

    EDIT "Sample program".txt

    So I'm thinking if you wanted to change to a directory with spaces you could go

    cd "Program files"

    Does that work?
    « Last Edit: March 24, 2006, 02:00:07 PM by Timothy_Bennett »
    "The geek shall inherit the Earth."

    Rob Pomeroy



      Prodigy

    • Systems Architect
    • Thanked: 124
      • Me
    • Experience: Expert
    • OS: Other
    Re: newbish problem
    « Reply #2 on: March 24, 2006, 02:55:57 PM »
    Getting deja vu here - someone asked about this recently.  Doesn't it make a difference which command interpreter parses the batch file?  i.e. cmd.exe versus command.com?
    Only able to visit the forums sporadically, sorry.

    Geek & Dummy - honest news, reviews and howtos

    Dusty



      Egghead

    • I could if she would, but she won't so I don't.
    • Thanked: 75
    • Experience: Beginner
    • OS: Windows XP
    Re: newbish problem
    « Reply #3 on: March 25, 2006, 12:19:22 AM »
    Cmd.exe accepts blanks in filenames, Command.com does not. (I think)

    Try them both to find out.

    Good luck...
    One good deed is worth more than a year of good intentions.

    theholygod

    • Guest
    Re: newbish problem
    « Reply #4 on: March 25, 2006, 02:15:11 AM »
    what is command.com? ive never heard of it before

    Dusty



      Egghead

    • I could if she would, but she won't so I don't.
    • Thanked: 75
    • Experience: Beginner
    • OS: Windows XP
    Re: newbish problem
    « Reply #5 on: March 25, 2006, 02:33:03 AM »
    See here.....
    One good deed is worth more than a year of good intentions.