Tom's Hardware > Forum > Windows XP > Configuration & Customize > Accepting input to BAT file by dragging.

Accepting input to BAT file by dragging.

Forum Windows XP : Configuration & Customize - Accepting input to BAT file by dragging.

Tom's Hardware: Over 1.4 million members in 6 different countries available to answer all your high-tech questions. Sign up now! Its free!
Word :    Username :           
 

Archived from groups: microsoft.public.windowsxp.configuration_manage (More info?)

 

Accepting input to BAT file by dragging.

How do I create a shortcut to a BAT file that will accept a file dragged
onto it.
I created a simple bat file "copyto.bat" which didn't work (containing):

@echo off
copy "%1" c:\xfer
copy "%1" c:\saves
exit

I then created a shortcut to it and modified the shortcut properties to
be:
C:\WINDOWS\Desktop\copyto.bat "%1"

When I drag a file onto the shortcut, it doesn't do the copy.
Does anyone have any suggestions or another way to do this?
(Win 2000 or XP)

Thanks.

Sponsored Links
Register or log in to remove.

Archived from groups: microsoft.public.windowsxp.configuration_manage (More info?)

 

"nospam" <x@ray.com> wrote in message news:410D4B2A.4B3E88D9@ray.com...
> Accepting input to BAT file by dragging.
>
> How do I create a shortcut to a BAT file that will accept a file dragged
> onto it.
> I created a simple bat file "copyto.bat" which didn't work (containing):
>
> @echo off
> copy "%1" c:\xfer
> copy "%1" c:\saves
> exit
>
> I then created a shortcut to it and modified the shortcut properties to
> be:
> C:\WINDOWS\Desktop\copyto.bat "%1"
>
> When I drag a file onto the shortcut, it doesn't do the copy.
> Does anyone have any suggestions or another way to do this?
> (Win 2000 or XP)
>
> Thanks.

I think only Windows applications that are specifically written
to accept drag n drop can do this.

A batch file does not fit that description-it's just
a command line.

Perhaps another user can recommend a specific Windows
app that knows how to do what you're trying to do.

Reply to Anonymous

Archived from groups: microsoft.public.windowsxp.configuration_manage (More info?)

 

Do not use quotes within batch file and do not modify shortcut, it should
point onto batch file only without parameters.

Reply to Anonymous
Tom's Hardware > Forum > Windows XP > Configuration & Customize > Accepting input to BAT file by dragging.
Go to:

There are 1273 identified and unidentified users. To see the list of identified users, Click here.

Please mind

You are about to answer a thread that has been inactive for more than 6 months.
If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.

Add a reply Cancel
Sponsored links
  • Ask the community now
  • Publish
Ad
They won a badge
Join us in greeting them