Python Forum
Windows: Put File automatically under Cursor for Drag & Drop
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Windows: Put File automatically under Cursor for Drag & Drop
#1
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.
Reply
#2
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Cursor Variable inside Another Cursor . CX_ORacle paulo79 1 1,477 Apr-09-2022, 10:24 AM
Last Post: ibreeden
  Cursor write 3rd file empty paulo79 3 1,826 Mar-10-2022, 02:51 PM
Last Post: DeaD_EyE
  batch file for running python scipt in Windows shell MaartenRo 2 1,822 Jan-21-2022, 02:36 PM
Last Post: MaartenRo
  Using a .bat file to execute simple anaconda commands in Windows 10 gacg1 0 4,619 Nov-30-2020, 03:24 PM
Last Post: gacg1
  change mouse cursor (in Windows) mgroen 0 1,592 Nov-11-2020, 11:26 AM
Last Post: mgroen
  Pyinstaller - I can't drag and drop into the CMD terminal anymore.. aquerci 4 5,774 Jan-25-2020, 12:24 PM
Last Post: aquerci
  Copy paste on a file automatically Aure4 2 2,226 Jan-18-2020, 07:09 PM
Last Post: michael1789
  Learn to use a JSON file to fill out Template Automatically Srotkowitz 1 2,043 Mar-06-2019, 08:15 PM
Last Post: Larz60+
  opening a file from a windows desktop folder- error opening file Charan007 1 2,930 Dec-06-2018, 11:50 AM
Last Post: buran
  Best way to return Cursor Data rajuarien 0 1,950 Jul-29-2018, 09:47 PM
Last Post: rajuarien

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020