os:windows:batch
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
os:windows:batch [2011-02-09 17:20] – root | os:windows:batch [2016-05-25 08:54] (current) – root | ||
---|---|---|---|
Line 24: | Line 24: | ||
Der Ablauf: | Der Ablauf: | ||
- | | + | |
- | | + | |
- | | + | |
- | + | | |
- | | + | |
- | | + | |
- | | + | |
- | + | | |
- | | + | |
- | + | ||
- | | + | |
- | + | ||
- | Skelett: | + | |
- | + | ||
- | @echo off | + | |
- | + | ||
- | call : | + | |
- | call :function2 argument1 argument2 | + | |
- | goto:eof | + | |
- | + | ||
- | + | ||
- | : | + | |
- | + | ||
- | goto:eof | + | |
- | + | ||
- | + | ||
- | : | + | |
- | + | ||
- | goto:eof | + | |
| | ||
==== Beispiele ==== | ==== Beispiele ==== | ||
Line 65: | Line 44: | ||
goto:eof | goto:eof | ||
:sleep | :sleep | ||
- | ping -n 1 -w %1000 1.2.3.4 >nul 2>&1 | + | ping -n 1 -w %1000 192.0.2.0 >nul 2>&1 |
goto:eof | goto:eof | ||
</ | </ | ||
Line 73: | Line 52: | ||
call:sleep 5 | call:sleep 5 | ||
</ | </ | ||
+ | |||
+ | IP-Adressse: | ||
=== counter === | === counter === | ||
Line 157: | Line 138: | ||
where pg_dump.exe >nul 2>&1 || set PATH=%PATH%; | where pg_dump.exe >nul 2>&1 || set PATH=%PATH%; | ||
</ | </ | ||
+ | |||
+ | == NAS Netzlaufwerk Sortierung mit dir == | ||
+ | Wird ein Share eines NAS, wie zum Beispiel Q-NAP TS-210 als Netzlaufwerk gemappt, bemerkt man schnell, dass beim Ausführen von //dir// eine willkürliche Sortierung verwendet wird: | ||
+ | |||
+ | < | ||
+ | M: | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | |||
+ | 09.12.2009 | ||
+ | 01.03.2010 | ||
+ | 21.03.2010 | ||
+ | 21.03.2010 | ||
+ | 21.03.2010 | ||
+ | 21.03.2010 | ||
+ | 21.03.2010 | ||
+ | 21.03.2010 | ||
+ | 21.03.2010 | ||
+ | 21.03.2010 | ||
+ | 21.03.2010 | ||
+ | 21.03.2010 | ||
+ | 21.03.2010 | ||
+ | 21.03.2010 | ||
+ | 12 File(s) | ||
+ | 2 Dir(s) | ||
+ | </ | ||
+ | |||
+ | Mit dem Parameter ///o// wird eine Sortierung erzwungen. Will man jedoch nicht bei jedem dir-Command diesen Parameter anhängen, kann man diesen in der dircmd-Variable definieren: | ||
+ | |||
+ | set dircmd=/o | ||
+ | |||
+ | In folgendem Beispiel wird nochmals der Befehl //dir// ausgeführt, | ||
+ | |||
+ | < | ||
+ | M: | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | |||
+ | 09.12.2009 | ||
+ | 01.03.2010 | ||
+ | 21.03.2010 | ||
+ | 21.03.2010 | ||
+ | 21.03.2010 | ||
+ | 21.03.2010 | ||
+ | 21.03.2010 | ||
+ | 21.03.2010 | ||
+ | 21.03.2010 | ||
+ | 21.03.2010 | ||
+ | 21.03.2010 | ||
+ | 21.03.2010 | ||
+ | 21.03.2010 | ||
+ | 21.03.2010 | ||
+ | 12 File(s) | ||
+ | 2 Dir(s) | ||
+ | </ | ||
+ | |||
===== Links ===== | ===== Links ===== | ||
* [[http:// | * [[http:// |
os/windows/batch.1297268450.txt.gz · Last modified: 2014-12-18 20:10 (external edit)