• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
xtremee

[CMD] How to perform up one level

7 posts in this topic

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
0

Share this post


Link to post
Share on other sites

Thanks a lot

it is workign

btw Where i can learn cmd prompts?

0

Share this post


Link to post
Share on other sites

windows help ... search for command line reference a to z. basics are there.

0

Share this post


Link to post
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. :)

0

Share this post


Link to post
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.