Q&A for How to Create and Delete Files and Directories from Windows Command Prompt

Return to Full Article

Search
Add New Question
  • Question
    How can I create directories?
    Subhodeep Roy
    Community Answer
    If you are creating a directory in C drive, the command will be"C:\MD {the name of the directory/folder}" then press Enter.
  • Question
    How do I create a folder using CMD?
    Community Answer
    Navigate to where you want the subfolder created and type "mkdir ".
  • Question
    How do I create a test file under the sub folder?
    Community Answer
    Change directory into the new sub folder and then on the next line, create your new test file. For example: cd mysubfolder $ type nul > newtextfile.txt
  • Question
    I have done the null thing but its not working. How exactly do I create a test file in a subfolder?
    Community Answer
    Type 'nul' with a single 'l'. It seems you have mistakenly typed 2 Ls. For example: type nul > filename.extn.
  • Question
    HoW do I create multiple php files using only one command in the window?
    Community Answer
    To execute multiple commands at once you use two ampersands connecting the commands. example:"type nul > filename.php && type nul > filename.php" you can do that more times if you desire.
  • Question
    How can I edit a file through the command prompt?
    Kyle Peck
    Community Answer
    If you use echo "content you want to add" >> filename.txt, you will update the content in the file. But be careful, echo "content you want to add" > filename.txt will overwrite all of the content in the file and replace it.
  • Question
    Is there any way I can adjust the clock on my desktop without having the administrator having to log in?
    Community Answer
    There isn't any way. This is a setting, and it must be done by the administrator of the computer.
  • Question
    I created a 'private' folder using a questionable .batch file. After deleting the suspicious folder, it comes right back when I use Microsoft Photos app. Can you help me uninstall it?
    Rudy Toth
    Community Answer
    Do the following... (can you get to the command prompt, not using Windows? Do you know how to gain access to the command prompt, being outside of Windows?) That may be the black screen with your cursor blinking at the upper left corner. Try this syntax and you must type it correctly also: C:\Windows\folder name\name of your batch file.bat erase. For example: C:\Windows\Rocker\HeavyMetal.bat erase then type CLS and then type EXIT.
  • Question
    How to open an application using cmd?
    Community Answer
    After opening the command line prompt with command 'cmd', navigate to the local directory where your application is installed using the 'cd' command with the path name (eg: cd C:/Program Files/App Name). Then type the name of the application's main executable file (eg: App.exe). The application will launch.
  • Question
    How do i go back from folder I just cd in?
    Community Answer
    If you want to go back one folder, use command cd. If you want to go back all the way to the top of the directory tree (root), use command cd\.
  • Question
    How do I list all files in a certain dir of a certain type through DOS prompt?
    Rudy Toth
    Community Answer
    Wow, seems lik you have an old computer. At the prompt, type the following: C:\>Dir *.* then press ENTER key. To clear the screen is to type in CLS that clears the screen listed items and then you type EXIT to leave the prompt. The asterisk being * and the dot and another asterisk * are wild cards to execute such commands. C:\>windows\*.* and when you press enter it should list all the Window files up on the screen and you use your down arrow on the keypad to see the below items by names. One more thing in order to your files to be in an alphabetical order from A to Z, then type C:\>Dir/W/O (you should write this all out).
Ask a Question

      Return to Full Article