New
#1
Run vs. Command Prompt vs Elevated command prompt?
Is there a rule of thumb to know which of the referenced you would use when entering a particular command or file name?
Mark
Is there a rule of thumb to know which of the referenced you would use when entering a particular command or file name?
Mark
Alas, I'm not aware of any such thing. It often comes down to figuring out what you want to do, finding the program(s) and/or command(s) necessary to accomplish such tasks, and then researching them one at a time to understand their runtime or execution requirements. Shoot! I'd love a resource like that myself. Recently, for example, it took me the better part of three days just to figure out which of the commands in the recently reissued Microsoft command line reference (PDF format) work within PowerShell and which ones require the command prompt, as recited in this May 14 blog post.
HTH,
--Ed--
Thanks, that gives a lot of perspective to my periodic head scratchers!
I'm not part of this conversation, but yes THANKS for the PDF link Ed. It's a more up to date and complete reference than the one I've been using.
Because of some things I have to do I let PowerShell remain on the right-click of the Start button but also have Command Prompt [Administrator] pinned to my Taskbar. Can change the Start menu back to Command Prompt but haven't otherwise found how to have both there.
Wiley,
Yes, that pdf contains up-to-date & complete information on the Windows 10 versions of Defrag, Format & FSUtil.
It also contains information on the server versions of many other commands.
I am watching these and keeping my fingers crossed -
Windows Command-Line: Backgrounder - TenForums
Windows Command-Line: Backgrounder - MSDN
Denis
Last edited by Try3; 22 Jun 2018 at 11:44.
Wiley,
Yes, I appreciate that. It is very difficult to get to grips with Windows commands without decent documentation or an onboard help system.
What you can do for most commands is open a command prompt and type in the command followed by /? to see its own help info. So, for example, you can enter
and it will show youCode:dir /?
Code:Displays a list of files and subdirectories in a directory. DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N] [/O[[:]sortorder]] [/P] [/Q] [/R] [/S] [/T[[:]timefield]] [/W] [/X] [/4] [drive:][path][filename] Specifies drive, directory, and/or files to list. /A Displays files with specified attributes. attributes D Directories R Read-only files H Hidden files A Files ready for archiving S System files I Not content indexed files L Reparse Points - Prefix meaning not /B Uses bare format (no heading information or summary). /C Display the thousand separator in file sizes. This is the default. Use /-C to disable display of separator. /D Same as wide but files are list sorted by column. /L Uses lowercase. /N New long list format where filenames are on the far right. /O List by files in sorted order. sortorder N By name (alphabetic) S By size (smallest first) E By extension (alphabetic) D By date/time (oldest first) G Group directories first - Prefix to reverse order /P Pauses after each screenful of information. /Q Display the owner of the file. /R Display alternate data streams of the file. /S Displays files in specified directory and all subdirectories. /T Controls which time field displayed or used for sorting timefield C Creation A Last Access W Last Written /W Uses wide list format. /X This displays the short names generated for non-8dot3 file names. The format is that of /N with the short name inserted before the long name. If no short name is present, blanks are displayed in its place. /4 Displays four-digit years Switches may be preset in the DIRCMD environment variable. Override preset switches by prefixing any switch with - (hyphen)--for example, /-W.
You can even save that information as a text file. You will come to think of this [later on] as easy but I'll be careful explaining it in case it is totally new to you.
1 Decide on a convenient folder that you want to save the text file in. Somewhere convenient for you such as your desktop which might well be in C:\Users\YOURUSERNAME\Desktop - you'll need to use your own username for this to work i.e. the path to the folder in C:\Users\ that holds your own files.
2 Decide what name you want to use for the text file. I just use the Command name itself e.g. Dir.txt but it is up to you.
So enter this to save the help information in that folder
Code:Dir /? >"C:\Users\YOURUSERNAME\Desktop\Dir.txt"
Once you have that information saved you can study it at your leisure even though it probably seems overwhelming at first sight. That should at least give you enough information to ask questions about the command so that you can start using it.
- As Ed said above, one of the great problems with Windows commands is that they have simply evolved over time and have no central philosophy governing their structure or use.
- You can learn a particular command but cannot always apply the same principles to using other commands.
It's all a bit of a mishmash.
I hope these comments have been useful,
Best of luck,
Denis