Nancy Street

nvarcmd

HomeInfoMusicGalleryPetsGeoHobbiesGeo
Links Removed Home « Computers « nvarcmd

varcmd is a .NET console command line utility written in C# that issues commands with variables substituted at runtime. This program can be very useful in batch files where files and directories can be created with dynamic dates and times or values prompted from the user.

Here is the help display from nvarcmd when no parameters are entered:

Description
nvarcmd is a console command that issues an operating system command from a
string that can contain variables that are substituted at runtime. The
variables can be parts of the date and time, environment variables or values
taken from dialogs. The command was intended for use in batch files.
Examples
nvarcmd "mkdir c:\backups\$Y$m$d"
nvarcmd "dir ""%(TEMP)\*.tmp""
nvarcmd "copy ""$(File to copy)"" ""%(TEMP)"""
Variables
$y ............ YY (year)
$Y ............ CCYY (century and year)
$m ............ MM (month)
$M ............ MMM (Month name prefix)
$d ............ DD (day)
$D ............ DDD (day name prefix)
$h ............ HH (hour)
$n ............ NN (minute)
$s ............ SS (second)
$(P:prompt) ... Dialog prompt for value
$(F:title) .... File picker dialog
$(D:title) .... Folder browser dialog
%(env) ........ Environment variable

Download

nvarcmd_proj.zip - (34KB) ZIP of the Visual Studio 2005 project.
nvarcmd_exe.zip - (0KB) Zip of the executable.

Back to: Computers & Software Main Page


Visitor Book ♦ Last Updated: 01-Jan-2012 14:58
Copyright © 1999-2010 Orthogonal Programming