Active Members
TodayLast 7 Daysmore...


Ask Experts » Computers » Software »

Command change the current directory in command mode

Date: 19 Jul 2012   Group: Computers    Category: Software   


In order to work with java program I had made a folder in local drive D and saved the programs there .When I am trying to open the folder in command mode the current directory to which it is pointing to local drive .What command need to be typed to change the current directory?


Find Answers
Want to learn MS DOS commands? Looking for commands in DOS? Find out the basic MS DOS commands to change directory, open file/folder in command mode here.

Author: Abhinav    25 Jul 2012      Member Level: Gold     Points : 4  (Rs 2)    Voting Score: 0
To change the current directory in command prompt, you need to type CD directory name. i.e.

C:\> CD Windows it will move to
C:\Windows
Note: you can also use asterisk sign to complete a directory name. i.e.

C:\> CD Win* it will move to
C:\Windows

In case you want to change drive and directory both then use CD /D Drive name:\Directory name i.e.

E:\> CD /D C:\win* will change to
C:\windows>


Reference: http://ss64.com/nt/cd.html
Author: Sabrez Alam    26 Jul 2012      Member Level: Gold     Points : 4  (Rs 2)    Voting Score: 0
Hi..

By default when you open command prompt it will take you to c drive. Am I right?

C:\>D:

Just right the above command and you will be shifted to D drive. Now you have to lacate your folder. Let assume you have a folder name called java.
D:\>cd java
Write the above command and hit enter. This will take you to the java folder looks like below.
D:\java>

To come out from the folder you need to give the following command:
D:\java>cd.. and hit enter.

To use java in command mode you need to set the path by using setpath command of java then javac to compile the program and then java to run the java program.





Author: Adi    28 Jul 2012      Member Level: Silver     Points : 4  (Rs 1)    Voting Score: 0
1.)A simple way just copy the complete path of the bin directory.
2.)Open command prompt type 'cd' without the quotes.
3.)Give a space.
4.)Right click and from the menu click paste.
5.)Hit ENTER key,You will enter in the directory.

Copy your programs to the bin folder of jdk.

For compiling the java program use the command "javac FILE_NAME",there should be space between javac and your file name. FILE_NAME indicates name of your file with .java extension.

After you compile the program a class file is generated.For running the program use the command "java FILE_NAME" here FILE_NAME can be without extension.

Example:- javac hello.java (for compilation)
java hello (for execution)

Author: arvind    03 Aug 2012      Member Level: Bronze     Points : 1    Voting Score: 0
you can use either
cd..
cd\

Answers      





Post answer or solution to "Command change the current directory in command mode"

You can earn revenue online from Google AdSense and our revenue sharing programs by post valid, self written answers for the problem Command change the current directory in command mode




You must Sign In to post a response.


Next Question: Recovery mode and download mode failure in android
Previous Question: Does VLC player destroys speakers of laptop?
Return to Question Index
Ask Question to Expert
Category:


 
Related Questions
Popular Tags   What are tags ?   Search Tags  
(No tags found.)
Awards & Gifts
ISC Technologies, Kochi - India. Copyright © All Rights Reserved.