Jump to content

[CMD] How to perform up one level


xtremee

Recommended Posts

Hi all,

I wanna to know how i can make up one level using cmd script as i have .cmd file and i wanna it to search for file reside in folder one level form the folder where .cmd in

Main folder
|___ Folder 1
|___ .cmd file
|___ Folder 2
|___ file required to check for it.

btw, the path for Main folder get changed from user to another.

How this action done?!

Edited by xtremee
Link to comment
Share on other sites


. -> refers to the current folder

.. -> refers to the parent folder

so 'cd .' leaves you in your current folder 'cd ..' takes you up one level. Also works for running commands, reeferencing files etc.

..\myexe.exe

runs myexe.exe out of parent folder

..\..\goaway.bat

runs goaway.bat from folder two levels up

showit ..\bestpic.jpg

runs showit and loads bestpic.jpg from folder one level up.

Best practice go live on a dos 6.22 machine for awhile without windows 3.1x you'll catch on quickly. :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...