Get the App
SLTechnology News&Howtos  ›  Development  › 

The usage of the VBS property ShortPath

Shulou Source: shulou.com Published: 2022-06-03 19:53:46 11月12日 Update

This article mainly explains "the usage of VBS attribute ShortPath". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "the usage of VBS attribute ShortPath".

Returns the name of the short path converted according to the 8.3 naming convention.

Object.ShortPath

Object should be the name of the File or Folder object.

Description

The following code illustrates how to use the ShortName property:

Function ShowShortPath (filespec) Dim fso, f, s Set fso = CreateObject ("Scripting.FileSystemObject") Set f = fso.GetFile (filespec) s = UCase (f.Name) & "

The short path name of "s = s &" is: "& f.ShortPath ShowShortPath = s End Function Thank you for reading, the above is the content of" the usage of VBS attribute ShortPath ". After the study of this article, I believe you have a deeper understanding of the use of VBS attribute ShortPath, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Attributes learning content path path name code name object that is ideas situations articles more knowledge knowledge points articles follow questions practice push Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia MariaDB OPPO Reno macOS Shulou Information