Working with Folders

Let’s discuss about how to create folders, how to move from one folder to another, how to move, how to copy, etc.

Commands:

1. cd:

  • “cd” stands for change directory.
  • It it used to move from one folder to another folder.

Usage:

Open the command prompt and type “cd foldername” this will change your current working directory.

For Example: Typing “cd videos” would move you into the videos directory if it exist in your current location.

- When you try to change directory to a folder that is not present in your system, then it shows error “cannot find the specified path”. This is because we cannot open a folder which is not present in our system even in file explorer.

- When you want to change directory to the parent folder, we have to use the command “cd ..”.

2. mkdir:

  • “mkdir” stands for make directory.
  • It it used to create new folder/folders.

Usage:

Open the command prompt and type “mkdir foldername” this will create a new directory with name as foldername.

3. copy filename folderpath

xcopy folder1 folder2: copies folder1 files to folder2

xcopy folder1 folder2 /s: copies folder1 files to folder2 , also includes subdirectories of folder1.

4. move a folder

move folder1 toFolder2

5. rename

rename folder1 folder1renamed

6. Remove a directory

rmdir foldername

rmdir /s FolderName

Questions? : Reach Out