Monday, October 6, 2008

Useful and Essential Commands

Essential Commands

dirLists names of files in current directory (folder)
dir Hello.*Lists all files whose names start with Hello.
cd C:\filesChanges directory to C:\files ("absolute" pathname)
cd myfilesChanges directory to myfiles subdirectory of current directory ("relative" pathname)
cd ..Changes directory to "parent" of current directory
notepad Hello.javaMS-DOS text editor, used to create and edit ASCII textfiles
type Hello.javaDisplays contents of ASCII textfile on screen
exitEnds command interpreter, makes console window go away...

Useful File Management Commands

copy Test1.java Test2.javaCopies contents of Test1.java to new file Test2.java
ren Test1.java Test2.javaRenames Test1.java to Test2.java
del Test1.javaDeletes Test1.java (Be careful with this command...)
del Test1.*Deletes all files with Test1 prefix (Be even more careful with this command...)
mkdir playpenCreates new directory playpen as subdirectory of current directory
rmdir playpenRemoves directory playpen (must be empty)

No comments: