Cynosure.X International LLC

:

Add Comment | Related Links | TrackBack
Related Content

ParameterModifiers.bat (GPL)

The Windows batch file parameter modifiers can be quite powerful. Microsoft explains all of the modifiers in the "Using batch parameters" document. The batch file attached below demonstrates each of the modifiers in action.

ParameterModifiers.bat is distributed as executable source code under the GNU General Public License. Please see the license agreement elsewhere on this site.

Attached File: ParameterModifiers.bat (303 B)

Chieh Cheng
Wed, 28 May 2008 08:24:11 +0000

Attached below is an improved version of the script. This version also outputs the modifiers so that you can see exactly which modifier has what effect.

Attached File: 1 - ParameterModifiers.bat (446 B)

Chieh Cheng
Tue, 08 Jul 2008 02:22:29 +0000

The following is an example of running the ParameterModifiers.bat.

%~0       = C:\bin\scripts\Windows\ParameterModifiers.bat
%~f0 = C:\bin\scripts\Windows\ParameterModifiers.bat
%~d0 = C:
%~p0 = \bin\scripts\Windows\
%~n0 = ParameterModifiers
%~x0 = .bat
%~s0 = C:\bin\scripts\Windows\PARAME~1.BAT
%~a0 = --a------
%~t0 = 07/21/2008 03:42 PM
%~z0 = 446
%~$PATH:0 = C:\bin\scripts\Windows\ParameterModifiers.bat
Press any key to continue . . .

Chieh Cheng
Mon, 21 Jul 2008 19:43:19 +0000

The parameter modifiers also works in a FOR loop. The following is an example:

  for /R "%localVaultPath%" %%f in (*) do (
echo %%f
echo %%~nf
)

Chieh Cheng
Thu, 10 Sep 2009 10:38:43 +0000

Add Comment | Related Links | TrackBack
Related Content

Did your message disappear? Read the Forums FAQ.

Add Comment

Spam Control | * indicates required field
Your Name: *
E-mail:
Remember Me!
Comment: *
File attachment is optional. Please do not attach a file to your submission unless it is relevent.
Attach File:
(20 MB Max)
Spam Protection: * Answer of 9 + 5?
Click button only once, please!

TrackBack

TrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites.

Send Ping | TrackBack URL | Spam Control

No TrackBacks yet. TrackBack can be used to link this thread to your weblog, or link your weblog to this thread. In addition, TrackBack can be used as a form of remote commenting. Rather than posting the comment directly on this thread, you can posts it on your own weblog. Then have your weblog sends a TrackBack ping to the TrackBack URL, so that your post would show up here.

Messages, files, and images copyright by respective owners.

Products | Services
Forums | Latest | RSS
Library | Search | Wiki
Help | Licenses

Login | Register

109 Users Online

Hacking Digital Cameras
Fun for Photographers


Get Our

Memecoins!



Amazon Associate

Copyright © 1996 - 2024. All Rights Reserved.