Total Commander Forum Index Total Commander
Форум поддержки пользователей Total Commander
Сайты: Все о Total Commander | Totalcmd.net | Ghisler.com | RU.TCKB
 
 RulesRules   SearchSearch   FAQFAQ   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Single Post  Topic: Script Content Plugin 
Author Message
Lev



PostPosted: Wed May 17, 2006 21:34    Post subject: Reply with quote

Относительный путь к файлу
Для использования в режиме BranchView (Ctrl+B), для работы требуется TCScript.Helper
В обсуждении на оф. форуме были и другие варианты
Code:
'relpath.vbs - Show relative path to file in the Branch view (Ctrl+B)
'Script for Script Content Plugin (c)Lev Freidin, 2005
'http://www.totalcmd.net/plugring/script_wdx.html
'http://wincmd.ru/plugring/script_wdx.html
Dim fso, f, tcs

Set fso = CreateObject("Scripting.FileSystemObject")
Set tcs = CreateObject("TCScript.Helper")

f = tcs.GetSrcPath
relpath = left(filename, len(filename) - len(fso.GetFileName(filename)))
relpath = Mid(relpath, Len(f)+1)
content = relpath

Set fso=nothing
Set tcs=nothing
View user's profile Send private message


Powered by phpBB © 2001, 2005 phpBB Group