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: Копирование имени без слеша 
Author Message
skyinfire



PostPosted: Fri Jan 17, 2014 02:06    Post subject: Reply with quote

Quote:
А система не x64, случаем?

да, W7х64

Quote:
Есть же cm_CopyFullNamesToClip и cm_CopyNetNamesToClip.

Собственно, с них и началась вся эта тема. Скрипты для того и написаны были, что стандартные ТС комманды оставляли слеши до или после имен.

Тогда здесь мне дали скрипт

Quote:
'=========================================
' Копировать имена выделенных папок/файлов
' Параметр: {%L|%l|%F|%f|%D|%d}
'=========================================
If WScript.Arguments.Count = 0 Then Wscript.Quit
Dim T
T = Replace(CreateObject("Scripting.FileSystemObject").OpenTextFile(WScript.Arguments(0), 1).ReadAll, "\" + chr(13), chr(13))
Text2Clip Mid(T, 1, Len(T) - 2)

Sub Text2Clip(pText)
Dim TCS
On Error Resume Next
Set TCS = CreateObject("TCScript.Helper")
If Err.Number > 0 Then
Dim A
On Error GoTo 0
Const P = "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3\1407"
With CreateObject("WScript.Shell")
A = .RegRead(P)
If A > 0 Then .RegWrite P, 0, "REG_DWORD"
With CreateObject("InternetExplorer.Application")
.Navigate("about:blank")
.document.ParentWindow.ClipboardData.SetData("text"), pText
End With
If A > 0 Then .RegWrite P, A, "REG_DWORD"
End With
Else
On Error GoTo 0
TCS.SetTextToClip(pText)
End If
End Sub


Он работает отлично - два ярлыка: с параметром %L копирует путь, с параметром %F - копирует имя. Но последний барахлит на FTP ресурсах.
Если этот скрипт допилить, то вопрос тоже был бы закрыт.
View user's profile Send private message


Powered by phpBB © 2001, 2005 phpBB Group