No e-Patents

heise online News

Massive Update-Probleme beim HTC Desire von O2

Provider-Haftung kein Thema mehr für ACTA-Verhandlungen

Öffentlich-Rechtliche und Private üben "ein bisschen Frieden"

Internet Explorer: Datenklau durch zwei Jahre alte Lücke

Sky-CEO: Wir können es ohne weiteres Geld von Murdoch schaffen

Musik-Download übers Radio

Neue 3D-Blu-ray-Titel und erste Details zu Skys 3D-Eventkanal

Themen-Special: Power-Tools fürs Internet

Runder Tisch zur digitalen Dividende angeregt

Internetportal soll Kulturgüter schützen helfen

BKA: Fehlendes Gesetz lähmt Internet-Ermittlungen

3D-Schnittprogramm aus Berlin

Windows .cmd script hints

Datum: 16.01.2009 17:49

Ensuring command extensions are active

set DUMMY=Dummy
if not !DUMMY!==Dummy cmd.exe /e:on /v:on /c %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
if not !DUMMY!==Dummy goto end                                        

rem do much work

:end

 

Parameter %0-%9 and variable %foo expansion functions

Most of these ~ functions can be combined.

%~1 Expands %1, removes surrounding quotes (")  
%~f1 Expands %1 to a fully qualified pathname  
%~d1 Expands %1 to a drive letter only  
%~p1 Expands %1 to a path only  
%~n1 Expands %1 to a filename only  
%~x1 Expands %1 to a file extension only  
%~s1 Changes the meaning of n and x options to reference the short name instead.  
%~$PATH:1 Searches the directories listed in the PATH environment variable and expands %1 to the fully qualified name of the first one found or empty string if nothing found.  
%~a1 Expands %1 to the file's attributes  
%~t1 Expands %1 to the file's date/time  
%~zl Expands %1 to the file's size  

Feel free to play with my sandbox script petest.cmd.

Contact  -  Kontakt  -  +  -  @  -  Impressum  -  AGB  -  © 2008 IBCL