# Can I do the opposite of FilesDragAndDropTarget?

**URL:** <https://forum.juce.com/t/can-i-do-the-opposite-of-filesdraganddroptarget/59064>\
**Category:** General JUCE discussion\
**Created:** [December 6, 2023, 5:19am UTC](https://forum.juce.com/t/can-i-do-the-opposite-of-filesdraganddroptarget/59064 "2023-12-06T05:19:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cool-mr-croc](https://avatars.discourse-cdn.com/v4/letter/c/958977/32.png) [@cool-mr-croc](https://forum.juce.com/u/cool-mr-croc)\
**Post date:** [December 6, 2023, 5:19am UTC](https://forum.juce.com/t/can-i-do-the-opposite-of-filesdraganddroptarget/59064/1 "2023-12-06T05:19:09Z")

</div>

FilesDragAndDropTarget seems to accept a file dragged on to it from an external application. Can I drag away from my component and somehow make the OS think that the mouse cursor is dragging with it a file? I could tempirarily create the file, I see no handy Juce functions like

MakeOsThinkMouseIsDraggingThisFile(filePointer\* fileLocation)

Use case would be to view midi information in my plugin, highlight midi, and drag away a midi file into the DAW.

---

<div class="post-metadata">

**Author:** ![yfede](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/yfede/32/506_2.png) [@yfede](https://forum.juce.com/u/yfede)\
**Post date:** [December 6, 2023, 9:09am UTC](https://forum.juce.com/t/can-i-do-the-opposite-of-filesdraganddroptarget/59064/2 "2023-12-06T09:09:07Z")

</div>

I believe [performExternalDragDropOfFiles()](https://docs.juce.com/master/classDragAndDropContainer.html#af3ea2f44bc2999149624190c33e346f6) might be what you are looking for.  
You have to create the files on disk to begin with, and then with this function you instruct the OS that they are being dragged as if picked from your plug-in window

---

<div class="post-metadata">

**Author:** ![cool-mr-croc](https://avatars.discourse-cdn.com/v4/letter/c/958977/32.png) [@cool-mr-croc](https://forum.juce.com/u/cool-mr-croc)\
**Post date:** [December 7, 2023, 2:25am UTC](https://forum.juce.com/t/can-i-do-the-opposite-of-filesdraganddroptarget/59064/3 "2023-12-07T02:25:19Z")

</div>

> [@yfede](#):
>
> performExternalDragDropOfFiles()

Ooh that’s perfect, tyvm
