' フォルダ名とファイル名をコピー ' shell:sendto に配置 Option Explicit Dim objFSO Dim objWS Dim objFF Dim cnt, argx, mystring Set objFSO = WScript.CreateObject("Scripting.FileSystemObject") if WScript.Arguments.Count = 0 then WScript.echo("too few arguments.") WScript.Quit(-1) end if mystring = "" For cnt = 0 To WScript.Arguments.Count - 1 argx = WScript.Arguments(cnt) If objFSO.FolderExists(argx) Then Set objFF = objFSO.GetFolder(argx) Else Set objFF = objFSO.GetFile(argx) End If If Len(mystring) = 0 Then mystring = objFF.ParentFolder & vbCrLf End If mystring = mystring & objFF.name & vbCrLf Next Set objWS = CreateObject("WScript.Shell") objWS.Exec("clip").StdIn.Write mystring