![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Get short file name from long one ? Hi, I have long file name like wscript.scriptfullname How do convert it to short form ? thanks Vilius |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Get short file name from long one ? On Jul 8, 10:08*am, "Vilius Mockûnas" <v_mocku...@xxxxxx> wrote: Quote: > Hi, > > I have long file name like wscript.scriptfullname > How do convert it to short form ? > > thanks > Vilius wscript.scriptname |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Get short file name from long one ? "Vilius Mockûnas" <v_mockunas@xxxxxx> wrote in message news:uHd4l90$JHA.4984@xxxxxx Quote: > Hi, > > I have long file name like wscript.scriptfullname > How do convert it to short form ? 'GetFolder' methods of the 'Scripting.FileSystemObject object'. Set oFSO = CreateObject("Scripting.FileSystemObject") MsgBox oFSO.GetFolder("C:\New Folder").ShortName MsgBox oFSO.GetFile("C:\New Folder\New Text Document.txt").ShortName MsgBox oFSO.GetFile("C:\New Folder\New Text Document.txt").ShortPath |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Get short file name from long one ? On Jul 7, 5:26*pm, "James Whitlow" <jwhitlow.60372...@xxxxxx> wrote: Quote: > "Vilius Mockûnas" <v_mocku...@xxxxxx> wrote in message > > news:uHd4l90$JHA.4984@xxxxxx > Quote: > > Hi, Quote: > > I have long file name like wscript.scriptfullname > > How do convert it to short form ? > * You can use the 'ShortName' & 'ShortPath' properties of the 'GetFile'& > 'GetFolder' methods of the 'Scripting.FileSystemObject object'. > > Set oFSO = CreateObject("Scripting.FileSystemObject") > > MsgBox oFSO.GetFolder("C:\New Folder").ShortName > MsgBox oFSO.GetFile("C:\New Folder\New Text Document.txt").ShortName > MsgBox oFSO.GetFile("C:\New Folder\New Text Document.txt").ShortPath strPath1 = "the fully quallified path" Set objFile=objFSO.GetFile(strPath1) Wscript.Echo objFile.ShortPath Put the fully quallified path in strPath1 and it returns the short path name. Or .ShortName |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Motherboard 1 long and 3 short beeps | General Discussion | |||
| multiselect file open dialog that supports long file names | VB Script | |||
| Fix for long, long, long deleting and copying of files? | Vista General | |||
| coping file from a remote file share - FILE IS NO LONG THERE bogus error message | Vista networking & sharing | |||
| Error 1325 - 'File name' is not a valid short file name. | Vista installation & setup | |||