1. Home
  2. CMD Line
  3. Create, Rename, Delete Files or Folders

Create, Rename, Delete Files or Folders

The steps below will shows you how to create, rename, delete files/folders via command line

Create a Folder
To CREATE a folder use the command “mkdir“. To create a folder in the directory you are currently in you can use “mkdir foldername” to make it in a different folder type the full path e.g “mkdir c:\foldername\foldername

mkdir "Folder Name"

Delete a File/Folder
To DELETE a folder use the command “del“. To delete a file/folder in the directory you are currently in you can use “del foldername” to delete it in a different folder type the full path e.g “del c:\foldername\foldername“. Once you press enter Type “Y” and press enter to delete

del "Folder Name"

Rename a File/Folder
To RENAME a folder use the command “ren“. To rename a file/folder in the directory you are currently in you can use “ren foldername new foldername” to rename it in a different folder type the full path e.g “ren c:\foldername\foldername c:\newfoldername“. The following example changes the folder name from c:\test to c:\test1

ren "Folder Name" "NewFolderName"
Updated on March 16, 2019

Was this article helpful?

Related Articles

Leave a Comment