Get the Short File Name (SFN) of a any file...

Questions and information about using VBScript and JavaScript in NeoBook functions

Moderator: Neosoft Support

Locked
David de Argentina
Posts: 1596
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina
Contact:

Get the Short File Name (SFN) of a any file...

Post by David de Argentina »

Save as SFN intro the VBscript folder:

[syntax=vb]{NeoBook Function}
Version=5.80
Language=VBScript
Param=[%1]|Text|LongFileName
Param=[%2]|Variable|Return var
{End}
publication.nbSetVar "[%2]", CreateObject("Scripting.FileSystemObject").GetFile("[%1]").ShortPath
[/syntax]

Usage:

[syntax=neobook]Call "SFN" "Long_File_Name" "ReturnVar"[/syntax]

enjoy !
David de Argentina
Locked