
Converting long file names to DOS format
function ShowShortName(filespec)
{
var fso, f, s;
fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.GetFile(filespec);
s = "The short name for " + "" + f.Name;
s += "" + "<br>";
s += "is: " + "" + f.ShortName + "";
return(s);
Quote:
}
--
Mark L. Ferguson Please reply in Newsgroup
marfer's notes for OE 5 > http://www.geocities.com/SiliconValley/Bay/6386/IE_ng_notes.htm
Quote:
> Hi everyone,
> I'm trying to pass WScript arguments to a DOS program but my script fails
> when the file has spaces in its name. Is there any command in WSH to
> transform file names with spaces into DOS format (Microsoft Office into
> Micros~1, and Microsoft Visual Studio into Micros~2, etc.)?
> Thanks,
> DS