Python Forum

Full Version: Windows: Put File automatically under Cursor for Drag & Drop
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I'm stuck on the following problem and can't seem to find a solution for it. Does anyone know if this is possible?

On Windows I have the directory path for a file.

I would like to have a Python Script which can automatically "put that file" under the Mouse Cursor so I can drop it into another application window.

So basically the effect should be the same, as manually navigating to the File Location and then dragging the file to a new location using drag and drop.
If you use a gui (tkinter is built in), you can list your files in whatever widget suits your purpose.
Once done, you can set the focus (or index) on the desired target