MSFN Forum: [CMD] How to perform up one level - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[CMD] How to perform up one level Rate Topic: -----

#1 User is offline   xtremee 

  • Windows Xpire Tech Center
  • PipPipPip
  • Group: Members
  • Posts: 440
  • Joined: 03-June 05

  Posted 18 December 2007 - 07:16 AM

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?!

This post has been edited by xtremee: 18 December 2007 - 07:19 AM



#2 User is offline   Arie 

  • One Man Army
  • PipPipPipPipPip
  • Group: Members
  • Posts: 835
  • Joined: 27-August 07

Posted 18 December 2007 - 07:26 AM

cd ..\"Folder 2"


#3 User is offline   xtremee 

  • Windows Xpire Tech Center
  • PipPipPip
  • Group: Members
  • Posts: 440
  • Joined: 03-June 05

Posted 18 December 2007 - 01:41 PM

Thanks a lot
it is workign
btw Where i can learn cmd prompts?

#4 User is offline   spacesurfer 

  • Pharmassist
  • Group: Patrons
  • Posts: 1,668
  • Joined: 31-July 04
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 18 December 2007 - 02:49 PM

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

#5 User is offline   IcemanND 

  • MSFN Junkie
  • Group: Super Moderator
  • Posts: 3,266
  • Joined: 24-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 18 December 2007 - 03:54 PM

. -> 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. :)

#6 User is offline   uid0 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 348
  • Joined: 12-June 06

Posted 19 December 2007 - 06:41 AM

This is a good scripting site, covers IcemanND's favoured OS too...
http://www.robvanderwoude.com/

#7 User is offline   IcemanND 

  • MSFN Junkie
  • Group: Super Moderator
  • Posts: 3,266
  • Joined: 24-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 19 December 2007 - 07:11 AM

View Postuid0, on Dec 19 2007, 07:41 AM, said:

This is a good scripting site, covers IcemanND's favoured OS too...
http://www.robvanderwoude.com/


I saw nothing on that site refering to TRS-DOS. :)

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy