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
Next revision
Previous revision
software:microsoft:windows:commands [2024/03/09 21:10] – [Scanner and Camera Wizard] superwizardsoftware:microsoft:windows:commands [2024/11/07 22:36] (current) – [Windows 10 folder with a name that has a trailing space] superwizard
Line 1: Line 1:
 +====== Windows Commands ======
 +
 +-------------------------------------------------------------------------------------------------------------------------------------------------\\
 +
 +====== Windows 10 folder with a name that has a trailing space ======
 +
 +
 +<WRAP center round box >
 +2024-11-05
 +
 +
 +Here you go:
 +    rd   / /q  "\\?\D:\Woodlawn Data\Folder 9 "
 +Please remember to mark my reply by clicking "Did this solve your problem?". It's your way of saying "Thank you".
 +
 +You have to dig much deeper than "rd /?" to find out what my syntax did. In essense \\?\ bypasses the Windows parsing process, thus allowing file/folder names that are basically illegal. Using the same syntax you could create a folder called "LPT1" or "ABC..." neither of which is allowed with the normal syntax.
 +
 +From <https://answers.microsoft.com/en-us/windows/forum/all/i-somehow-created-a-windows-10-folder-with-a-name/0968bff5-c5eb-4701-827b-d1bdb084ccc7> 
 +
 +
 +  Dir /x
 +
 +note the short name of the problem folder - this will end in ~1
 +to rename the folder type the following and press enter
 +
 +  ren shortname~1
 +
 +From <https://answers.microsoft.com/en-us/windows/forum/all/remove-a-folder-with-space-at-the-end/2db209ad-9e82-41dd-b05b-4ed681845aa9> 
 +
 +
 +
 +
 +</WRAP>
 +
 ====== Windows command line continue line with ^ () or use variables ====== ====== Windows command line continue line with ^ () or use variables ======
  
-<WRAP center round box 60%>+<WRAP center round box >
  
 2024-03-09 2024-03-09
Line 8: Line 42:
 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.1710018627.txt.gz · Last modified: by superwizard