Search results
- Officially/traditionally in DOS/Windows the command-line switch is signified by a forward slash (/). Officially/traditionally in practically all other OSs (for example: *nix flavors) they use a dash (-). This is one of the fundamental differences between the way the OSs are designed and used.
superuser.com/questions/745951/dash-or-slash-in-batch-file
The windows cmd.exe command shutdown only documents forward slash / switches, but it accepts dash -switches as well. For instance, both work: shutdown /s /t 0 shutdown -s -t 0 When was this added and why?
Officially/traditionally in DOS/Windows the command-line switch is signified by a forward slash (/). Officially/traditionally in practically all other OSs (for example: *nix flavors) they use a dash (-). This is one of the fundamental differences between the way the OSs are designed and used.
The right way depends on it's use. For a path to a local file on a windows machine, use backslash. For a path to a web resource or file located on a UNIX based machine (includes Macs, Linux), use a slash. The reason .NET's URI uses forward slashes is because it's formatting for use in a webbrowser.
shutdown.exe -r -f -t 0 and shutdown.exe /r /f /t 0 appear to be functionally identical, either dash or slash will work. Neither XP/7 (US-en) lists the "Y" switch as an option however.
Dec 16, 2017 · The 'dash' - is the unix-style equivalent of the 'slash' / and indicates an option will follow it. They are generally interchangeable in a command prompt, while poweshell requires the dash to be used. The following commands in a command prompt are identical: help cmd -? help cmd /?
Feb 10, 2014 · Windows uses backslashes for paths, while everything else seems to use forward slashes. Modern software tries to automatically correct you when you type the wrong type of slash, so it doesn't matter which type of slash you use most of the time. But, sometimes, the difference still matters.
People also ask
Does Windows CMD Exe slash / switch / dash - switches?
Does Windows CMD support forward slashes?
Does Windows CMD Xe support forward slashes?
Is there a command that only uses a dash?
Does a dash - or a slash / work equally in a batch file?
Do batch files have a slash?
To launch a batch script with spaces in the script Path and other parameters, all requiring quotes: CMD /k " "c:\batch files\test.cmd" "Parameter 1 with space" "Parameter2 with space" ". Double quotes in a command line with a backslash escape: powershell.exe -command "& {$m = \"hello world\";write-host $m}"