Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Этот скрипт позволяет получить короткий путь к файлу.
- '(C)Alex.Devil.LX 2011
- Set FSO = CreateObject ("Scripting.FileSystemObject")
- 'Создаем объект FileSystemObject
- Set Dialog = CreateObject("UserAccounts.CommonDialog")
- 'Создаем диалог "Открыть файл"
- Dialog.Filter = "Все файлы (*.*) | *.*"
- Dialog.FilterIndex = 0
- Dialog.InitialDir = "C:\Documents and Settings\%Username%\"
- IntResult = Dialog.ShowOpen
- 'Настраиваем диалог
- Set file1 = FSO.GetFile (Dialog.FileName)
- ShPath = file1.ShortPath
- MsgBox "Короткий путь к файлу: " & ShPath , vbQuestion, "Короткий путь к файлу:"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement