Skip to content Skip to sidebar Skip to footer

Get Path Of Selected Files In Windows Explorer Using Python

I would like to select some files on my desktop and then using python script(that will be launched by keyboard combinatoion pressing) get path of all selected files. I know how to

Solution 1:

I understand pyHook just reads the low level keyboard events. What you want to do is not possible with your approach. You need to get the Windows Explorer to actually tell you the paths you want to know, it needs to invoke the script itself. For this you need shell extension. You can use pywin32 to create them in Python. Here's the documentation to get you started.


Post a Comment for "Get Path Of Selected Files In Windows Explorer Using Python"