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 655 Apr-09-2022, 10:24 AM
Last Post: ibreeden
  Cursor write 3rd file empty paulo79 3 982 Mar-10-2022, 02:51 PM
Last Post: DeaD_EyE
  batch file for running python scipt in Windows shell MaartenRo 2 687 Jan-21-2022, 02:36 PM
Last Post: MaartenRo
  Using a .bat file to execute simple anaconda commands in Windows 10 gacg1 0 2,970 Nov-30-2020, 03:24 PM
Last Post: gacg1
  change mouse cursor (in Windows) mgroen 0 1,052 Nov-11-2020, 11:26 AM
Last Post: mgroen
  Pyinstaller - I can't drag and drop into the CMD terminal anymore.. aquerci 4 3,856 Jan-25-2020, 12:24 PM
Last Post: aquerci
  Copy paste on a file automatically Aure4 2 1,670 Jan-18-2020, 07:09 PM
Last Post: michael1789
  How to avoid slow cursor operations? sevensixtwo 0 1,357 Oct-11-2019, 02:23 PM
Last Post: sevensixtwo
  Learn to use a JSON file to fill out Template Automatically Srotkowitz 1 1,540 Mar-06-2019, 08:15 PM
Last Post: Larz60+
  opening a file from a windows desktop folder- error opening file Charan007 1 2,296 Dec-06-2018, 11:50 AM
Last Post: buran

Forum Jump:

User Panel Messages

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