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

Author Topic: What command does so the batch move up a folder?  (Read 7321 times)

0 Members and 1 Guest are viewing this topic.

Contex

  • Guest
What command does so the batch move up a folder?
« on: December 20, 2007, 09:02:20 AM »
Well I'm sitting here with a problem.
Well 2 problems :)

Problem Number 1:

Well I want this batch file to move up a folder, example: If the batch file (.bat) is in C:/Program files/ea games/auto. So it just move up a directory C:/Program files/games? Could any me answer me please :) And i dont want the normal command: cd C:/Program files/ea games. But another one that you dont need to type the path in.

Example:

@echo off
WHAT COMMAND?
start mohbtdemo.exe

Problem Number 2:

Well at this problem I want to know if it's possible to make the batch file (.bat) find the directory by itself. Well like this:
it searches for this path: ea games.
So it find the path by it self and runs from there?

Thanks :)

gpl



    Apprentice
  • Thanked: 27
    Re: What command does so the batch move up a folder?
    « Reply #1 on: December 20, 2007, 09:35:04 AM »
    1] this is easy -
    CD ..
    the .. means the parent directory

    2] not sure what you are getting at ? If you mean the program is in c:\ea games, then just
    CD "c:\ea games"

    If its any more complex than this, then try to give a bit more info
    Cheers
    Graham

    Contex

    • Guest
    Re: What command does so the batch move up a folder?
    « Reply #2 on: December 20, 2007, 09:53:53 AM »
    Well let's forget number 2. If number 1 works I don't need number 1.
    Well the thing is that i want the directory to change, example move up a folder.

    The bat file is in: C:/Program files/ea games/auto
    But i want it to run a program from: C:/Program files/ea games
    Also this Directory/Path is changed from computer to computer.
    That's why I want the batch file just to move up a folder. From C:/Program files/ea games/auto to C:/Program files/ea games ? And I cant use the cd C:/Program files/ea games at this step because the directory/path is changed from comp to comp..

    Help :D?


    NVM didnt read first answer.. :D THANKS DUDE !!! :D