Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

[CMD] How to perform up one level

- - - - -

  • Please log in to reply
6 replies to this topic

#1
xtremee

xtremee

    Windows Xpire Tech Center

  • Member
  • PipPipPip
  • 450 posts
  • Joined 03-June 05
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, 18 December 2007 - 07:19 AM.



How to remove advertisement from MSFN

#2
Arie

Arie

    One Man Army

  • Member
  • PipPipPipPipPip
  • 835 posts
  • Joined 27-August 07
cd ..\"Folder 2"

Not trying to pretend the enemy that I am.

#3
xtremee

xtremee

    Windows Xpire Tech Center

  • Member
  • PipPipPip
  • 450 posts
  • Joined 03-June 05
Thanks a lot
it is workign
btw Where i can learn cmd prompts?

#4
spacesurfer

spacesurfer

    Pharmassist

  • Patrons
  • 1,668 posts
  • Joined 31-July 04
  • OS:Windows 7 x86
  • Country: Country Flag
windows help ... search for command line reference a to z. basics are there.
_____________________________________________________________________
[Modify Office 2007 / 2010 Ribbon UI] [Javascript Guide] [Methods of Typing in Gujarati] [My Math Pages]
[Boot Windows 7 from VHD] [Multi-boot Vista/XP and other OSes with Grub Menu] [Boot XP and Vista Independently]


Gigabyte GA-P35-DS3L, Intel Core 2 Duo E6550 2.33 GHz, ASUS Radeon EAH3450 256 MB, 6 GB Corsair RAM, Maxtor 300 GB + Seagate 400 GB HDDs, Windows 7 Ultimate 64-bit
IBM T42 Intel Pentium M 1.7 GHz, 1.5 GB RAM, Radeon Mobility 7500, 160 GB HDD, Windows 7 Ultimate 32-bit

#5
IcemanND

IcemanND

    MSFN Junkie

  • Super Moderator
  • 3,266 posts
  • Joined 24-September 03
  • OS:Windows 7 x64
  • Country: Country Flag
. -> 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
uid0

uid0

    Advanced Member

  • Member
  • PipPipPip
  • 357 posts
  • Joined 12-June 06
This is a good scripting site, covers IcemanND's favoured OS too...
http://www.robvanderwoude.com/

#7
IcemanND

IcemanND

    MSFN Junkie

  • Super Moderator
  • 3,266 posts
  • Joined 24-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

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




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users