User Tools

Site Tools


software:microsoft:windows:commands

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
software:microsoft:windows:commands [2024/03/09 21:10] – [Windows command line continue line with ^ () or use variables] superwizardsoftware:microsoft:windows:commands [2024/03/09 21:11] (current) – [Windows command line continue line with ^ () or use variables] superwizard
Line 8: Line 8:
 Multiple commands can be put in parenthesis and spread over numerous lines; so something like echo hi && echo hello can be put like this: Multiple commands can be put in parenthesis and spread over numerous lines; so something like echo hi && echo hello can be put like this:
  
-( echo hi +  ( echo hi 
-  echo hello )+    echo hello )
  
 Also variables can help: Also variables can help:
  
-set AFILEPATH="C:\SOME\LONG\PATH\TO\A\FILE" +  set AFILEPATH="C:\SOME\LONG\PATH\TO\A\FILE" 
-if exist %AFILEPATH% ( +  if exist %AFILEPATH% ( 
-  start "" /b %AFILEPATH% -option C:\PATH\TO\SETTING... +    start "" /b %AFILEPATH% -option C:\PATH\TO\SETTING... 
-) else ( +  ) else ( 
-..+  ..
  
 https://stackoverflow.com/questions/69068/split-long-commands-in-multiple-lines-through-windows-batch-file/21000752#21000752 https://stackoverflow.com/questions/69068/split-long-commands-in-multiple-lines-through-windows-batch-file/21000752#21000752
software/microsoft/windows/commands.txt · Last modified: 2024/03/09 21:11 by superwizard