Arguments are overriden when using Drag&Drop

Microsoft Windows
Post Reply
gue11
Posts: 1
Joined: 2022-Apr-22, 11:06 am

Arguments are overriden when using Drag&Drop

Post by gue11 »

Hello, I'm Gunter.

Hope, that someone in this forum can help me:

In my VB script I use arguments that specify target paths for copying files. As an example: A link from my script has the arguments /dest:"c:\out c:\in". This means that files should be copied to these two directories.

But now I want to use the script with Drag&Drop as well. When I drag a file onto the link, my arguments are overridden with the filename.

Does anyone know, how I can keep both, the dropped filename and the arguments of the link?

Thank you and best regards
Gunter
User avatar
Simon Sheppard
Posts: 83
Joined: 2021-Jul-10, 7:46 pm
Contact:

Re: Arguments are overriden when using Drag&Drop

Post by Simon Sheppard »

My first thought would be to add a batch file, drag a file onto the batch file,which then calls the VBScript using cscript.exe passing whatever arguments you want, which could include %* for the dropped filename(s).
Post Reply