header

 

More links

AutoHotkey | Android | Arduino | COMM140Fractals | Grammar Checkers | Knots | A Million Dots Activity |  Processing | Processing for Scratch Users | Redbubble | Tutorials | Weather | World Time Meeting Planner | Favicon Generator.

Home > Tutorials & Notes > Useful DOS Command Prompt Commands

Useful DOS Commands

 

List all files in a directory to a text file

http://txpress.blogspot.com.au/2008/11/copy-all-filenames-in-directory-to-text.html

1. Open up your command prompt by typing cmd in the run dialog box and hitting Enter.
2. Navigate to the directory which has the files and type the following command -
DIR /B /O:N > filename.txt
This will save all the filenames in the current directory to a text file. The text file will be saved in the same directory.
3. To save file names from any sub-directories in the current folder, just add /S like -
DIR /B /O:N /S > filename.txt

 

 

Command Line Fun: How to Flatten a Folder Hierarchy

http://mlichtenberg.wordpress.com/2011/01/25/command-line-fun-how-to-flatten-a-folder-hierarchy/

for /r %f in (*) do @copy "%f" .

Note that the trailing period in the command is significant… it designates the current folder as the destination for the copy operation.

 


 

 


APA citation:
Russell, R. (2016, July 04, 03:38 pm). Tutorials & notes.
     Retrieved November 23, 2024, from http://www.rupert.id.au/tutorials/index.php

Last refreshed: November 23 2024. 05:02.05 am

rupert dot russell at acu dot edu dot au Support Wikipedia

Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.


907 Visits since MAY 11, 20014