1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

フルパスをコピー

Last updated at Posted at 2016-10-25

フルパスをコピー

以下のスクリプトを保存して
sendToにショートカットをおいておく

copyfullpath.vbs
Option Explicit

Dim tmp
Dim Args
Set Args = CreateObject("System.Collections.ArrayList")

IF WScript.Arguments.Count > 0 Then
	For Each tmp In WScript.Arguments
		Args.Add tmp
	Next
	Call PutInClipboardText( Args.ToArray() )
End If


Public Sub PutInClipboardText(ByVal arr)
	Dim cmd
	Dim str
	Dim WSH
	str = Replace(Replace(Join(arr,vbCrLf),"\","\\"),vbCrLf,"\n")
	cmd = "mshta.exe ""javascript:clipboardData.setData('text', '" & str & "');close()"""
	Set WSH = CreateObject("WScript.Shell")
	Call WSH.Run("%ComSpec% /c " & cmd, 0, false)
End Sub
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?