1
2

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 1 year has passed since last update.

【bat】fileをD&Dしたらfilepath取得する.batを作る

Posted at

概要

WindowsでファイルをD&Dしたらファイルパス取得するバッチファイルを作る

ファイルパスをクリップボードにコピーする方法
上記のような方法でも良いがダブルクォートが入ったり少し面倒な為、メモ

成果物

作成したファイルに
image.png
pathを調べたいファイルをD&Dすると
image.png

クリップボードに下記のように保存される
C:\Users\hoge\Desktop\fuga\hoge.txt 

作成方法

下記内容のバッチファイルを作る

<nul set/p=%1|clip
1
2
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
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?