Incode Systems Home Page Incode Systems, Inc.


SHORTNM



(Windows 95 or higher command line utility)

ShortNm - Copyright (C) 2002-2012, Incode Systems, Inc.
Version 2.1.0 www.incodesystems.com sales1ShortNm (Short Name) returns the short version of long file
and / or directory names. The file name may be supplied
from the command line or the standard input device.
The short file names are written to the standard output device.

Usage: [options] [LongFileName]
If LongFileName is not given, ShortNm waits for input from the
Standard Input Device.
(Note: If a LongFileName on the command line contains a space,
surround it with double quotes. Do not use double quotes,
however, with long file names from the Standard input device.)
Options:
-f Fully quality file name
-r output is: REN ShortNm "LongFileName"
(path on ShortNm is relative to the current directory)
-t output is: LongFileNameUsage: [options] [LongFile1 [LongFile2]..[LongFileN]] -cmd:MyCmd.bat %1 %2
ex: ShortNm "Long File 1" "Long File 2" -cmd:MyCmd.bat %1 %2
The command line above finds the short name for "Long File 1"
and "Long File 2", then runs MyCmd.bat with the two parameters
The -cmd: option allows the use of long file names with programs
not capable of handling them directly. If a long file name
is not found, it is created and the short name is used.
Note: -cmd: must be at the end of the command line, use %%1 in BAT file.
Options:
-e Echo the command line to the standard output
-f Fully quality file name
-n No execute (use with -e to echo command line without executing)
Hint: Could be used to echo a command line to a batch file.
-p:changes parameter marker character from % to (or other character)
-p:#254 changes parameter marker character from % to ASCII 254
-p:## changes parameter marker character from % to #
-unc Use UNC name for files not on a local drive.

The following statements will create a BAT file that renames
files from short name to long name.
DIR *.*/B/S/A-D | ShortNm -R >LONGNAME.bat
DIR *.*/B/S/AD | ShortNm -R | REV>>LONGNAME.bat
This is useful to transport files using using short names and then
restore the original long name at the destination to make both long and
short file names match.