CMD: verschil tussen versies
Uit Mike´s Wiki
k |
k |
||
| (6 tussenliggende versies door dezelfde gebruiker niet weergegeven) | |||
| Regel 1: | Regel 1: | ||
| + | = Extension based execution = | ||
| + | |||
| + | This shows which executable is used for a certain file extension. | ||
| + | {| border="0" cellspacing="0" cellpadding="1" style="border-width: 1px; border-spacing: 2px; font-size:11px;" | ||
| + | |+ ''' Which exe is used to execute a file extension''' | ||
| + | |<pre> | ||
| + | $>assoc .vbs | ||
| + | .vbs=VBSFile | ||
| + | |||
| + | $>fstype VBSFile | ||
| + | VBSFile="%SystemRoot%\System32\WScript.exe" "%1" %* | ||
| + | |||
| + | </pre> | ||
| + | |} | ||
| + | |||
= Extended variable usage = | = Extended variable usage = | ||
Huidige versie van 31 dec 2015 om 15:16
Extension based execution
This shows which executable is used for a certain file extension.
$>assoc .vbs .vbs=VBSFile $>fstype VBSFile VBSFile="%SystemRoot%\System32\WScript.exe" "%1" %* |
Extended variable usage
Parameter to analyse : [ "C:\WINDOWS\system32\user.exe" ] | ||
%1 %~1 %~f1 %~d1 %~p1 %~n1 %~x1 %~s1 %~a1 %~t1 %~z1 |
Actual value Expands %1 and removes quotes Expands %1 to a full path Expands %1 to a drive letter Expands %1 to a path Expands %1 to a file name Expands %1 to a file extension Expands %1 to a short path name Expands %1 to a file attributes Expands %1 to a date and time Expands %1 to the size of file |
"C:\WINDOWS\system32\user.exe" C:\WINDOWS\system32\user.exe C:\WINDOWS\system32\user.exe C: \WINDOWS\system32\ user .exe C:\WINDOWS\system32\user.exe --a------ 2004-08-04 06:00 47872 |
%~PATH:1 |
Searches the path for %1 and expands to the fully qualified name when found in the PATH variable. When not found, the result is an empty string | |
Possible combinations of modifiers you can use to get compound results | ||
%~dp1 %~nx1 %~atzf1 |
Expands %1 to a drive + path Expands %1 to a filename + ext Expands %1 to a dir-like output |
C:\WINDOWS\system32\ user.exe --a------ 2004-08-04 06:00 47872 C:\WINDOWS\system32\user.exe |
Shows some other manipulations | ||
%T% %T:~0,4% %T:~4% %D% %D:~0,2% %D:~3,2% %D:~6,2% %D:~9,4% %T:~1,-2% %T% %T: =% %T: =_% |
The actual value Fetches left part of the var Fetches right part of the var Actual date values Weekday Day Month Year Remove 1st and last 2 chars The actual value Remove all spaces Replace space with underscore |
Some Text With Spaces Some Text With Spaces 2011-03-16 20 1- 3- 6 ome Text With Space "Some Text With Spaces " "SomeTextWithSpaces" "Some_Text_With_Spaces_" |