Difference between revisions of "Computer Productivity Hacks"

From TeleCafeWiki
Jump to navigation Jump to search
(→‎Command Line: How to get a list of sub-folders and their files, ordered by folder-names)
(A PowerShell script to list all files and folders within a directory)
Line 2: Line 2:
 
* [http://learncodethehardway.org/cli/book/cli-crash-course.html Command Line Crash Course]
 
* [http://learncodethehardway.org/cli/book/cli-crash-course.html Command Line Crash Course]
 
: Quick super fast course in using the command line. It is intended to be done rapidly in about a day or two, and not meant to teach you advanced shell usage.
 
: Quick super fast course in using the command line. It is intended to be done rapidly in about a day or two, and not meant to teach you advanced shell usage.
 +
 +
=== Windows Command Line ===
 +
* [http://stackoverflow.com/questions/15165295/a-powershell-script-to-list-all-files-and-folders-within-a-directory A PowerShell script to list all files and folders within a directory]
 +
: This tutorial contains several working answers for using [[wikipedia:Windows PowerShell|Windows PowerShell]] to list files and folders.
 +
 +
* [http://blogs.technet.com/b/heyscriptingguy/archive/2014/02/03/list-files-in-folders-and-subfolders-with-powershell.aspx List Files in Folders and Subfolders with PowerShell]
 +
: Very verbose, but eventually steps through the tutorial.
  
 
* [http://stackoverflow.com/questions/3447503/how-to-get-a-list-of-sub-folders-and-their-files-ordered-by-folder-names How to get a list of sub-folders and their files, ordered by folder-names]
 
* [http://stackoverflow.com/questions/3447503/how-to-get-a-list-of-sub-folders-and-their-files-ordered-by-folder-names How to get a list of sub-folders and their files, ordered by folder-names]
 
: Works with [[wikipedia:Command Prompt|cmd.exe]], but doesn't seem to work with [[wikipedia:Windows PowerShell|Windows PowerShell]].
 
: Works with [[wikipedia:Command Prompt|cmd.exe]], but doesn't seem to work with [[wikipedia:Windows PowerShell|Windows PowerShell]].
  
=== Windows Command Line ===
 
 
* [http://www.computerhope.com/robocopy.htm Microsoft DOS robocopy command]
 
* [http://www.computerhope.com/robocopy.htm Microsoft DOS robocopy command]
 
: Robocopy: A robust file copy command for the Windows command line.
 
: Robocopy: A robust file copy command for the Windows command line.

Revision as of 13:08, 8 February 2014

Command Line

Quick super fast course in using the command line. It is intended to be done rapidly in about a day or two, and not meant to teach you advanced shell usage.

Windows Command Line

This tutorial contains several working answers for using Windows PowerShell to list files and folders.
Very verbose, but eventually steps through the tutorial.
Works with cmd.exe, but doesn't seem to work with Windows PowerShell.
Robocopy: A robust file copy command for the Windows command line.
Each command is linked to more info about the particular command.
The xcopy command is a Command Prompt command used to copy one or more files and/or folders from one location to another location.

Generate File List

Example: C:\Users\me\Downloads\MyFolder> dir /b > filelist.txt
(The text in orange shows the command used once you've navigated into the directory from which you want to generate the list of file names.)

Folder & File Compression

Example: for /d %%X in (*) do "c:\Program Files\7-Zip\7z.exe" a "%%X.zip" "%%X\"
To compress a folder without using any particular compression software.