'===================================================================== ' copy_current_dir_name2clip_2.vbs ' Копировать имя текущей папки в буфер ' В параметрах кнопки TC должно быть прописано: ' "%P" ' Работает в Win Vista и выше '===================================================================== Option Explicit Dim CurPath, CurDir, FSO, WSH If WScript.Arguments.Count = 0 Then MsgBox "Не указаны параметры!", vbOKOnly + vbError, "Внимание!" Wscript.Quit End If Set FSO = CreateObject("Scripting.FileSystemObject") Set CurPath = FSO.GetFolder(WScript.Arguments(0)) CurDir = CurPath.Name Set WSH = CreateObject("WScript.Shell") WSH.Exec("%ComSpec% /c @echo " & CurDir & "| clip.exe") Set FSO = Nothing Set CurPath = Nothing Set WSH = Nothing WScript.Quit |