October 01, 2020
If you type help from your windows command shell session, you will get a list of all available shell commands.
:: List contents of the current directory dir :: List contents of the specified directory dir c:\Users\
:: Basic usage mkdir <new-directory-name> :: Alternatively, use md md new-directory :: Create a new directory at a specified path mkdir c:\\temp\test2 :: View built in help page mkdir /?
del <file-path-or-name> :: View built in help page del/?
rmdir <path-to-directory> :: See built-in help page for more options rmdir /?
:: Print contents of a file to console output type <filename> :: View built-in help page type /?
:: Example: Add python to Windows path SET path=%path%;c:\python27 :: View all environment variables SET :: View a specific environment variable e.g. PYTHONPATH SET PYTHONPATH :: View build in help page SET /?
:: Copy file to a new directory copy <source-file-path> <destination-file-path> :: View built-in usage guide copy /? :: Copy all files and sub-directories to a new location > xcopy <source-directory> <destination-directory> :: View built-in help page > xcopy /? :: Move file to a new destination > MOVE <source-path> <destination-path> # View help page > MOVE /?
Note that you can use the move command to rename a file. For example move hello1.py hello.py will essentially rename hello1.py into hello.py
:: Search for the word 'hello' inside a file named hello.py type hello.py | findstr /R "hello" :: Search for all text files in the current directory dir | findstr /R ".*.txt" :: See built-in help page for more information findstr /?
doskey ls=dir :: ls will now display the contents of the current directory ls
Note that the alias will only be usable from the current shell session.