Results 1 to 3 of 3
Thread: Changing current directory
- 10-22-2012, 06:28 PM #1
Member
- Join Date
- Oct 2012
- Posts
- 3
- Rep Power
- 0
Changing current directory
Hello everyone,
When I want to compile my source file and I want to change my directory to where the file is located, instead of being able to write
cd C:\java
I have to write cd C:\Users\pcworld\Document\Java
Everything works fine but I just wondered if I could do anything to enable me to just write cd C:\java instead?
Many Thanks
- 10-22-2012, 08:12 PM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,547
- Rep Power
- 11
Re: Changing current directory
"C:\Users\pcworld\Document\Java" and "C:\java" are two different places. So you can't cd to one if you mean the other.
The cd command uses relative paths - paths relative to where you currently are. So, for example, if you are in the C:\Users\pcworld\Document directory (folder), you can say
This will also take you to C:\Users\pcworld\Document\Java.Java Code:c:\Users\pcworld\Document>cd Java
- 10-23-2012, 03:59 PM #3
Similar Threads
-
Wrong current working directory
By tux008 in forum Advanced JavaReplies: 10Last Post: 07-12-2011, 08:22 AM -
changing current directory
By flaca in forum New To JavaReplies: 7Last Post: 03-06-2011, 02:50 AM -
How to get Current Directory through File
By Java Tip in forum java.ioReplies: 0Last Post: 04-05-2008, 10:14 AM -
How to get the current working directory in EJB?
By sathish_2111 in forum Enterprise JavaBeans (EJB)Replies: 1Last Post: 07-19-2007, 04:24 PM -
How can i get current directory?
By Ashley in forum New To JavaReplies: 1Last Post: 05-26-2007, 01:21 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks