.bat files

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm working with MS-DOS batch files (.bat), and i'm trying to make them easy
to use for users.

if the copy.bat file is like this

rem copy.bat
echo coping from %1 to %2
copy %1name.txt %2name.txt
echo OK

how can I make a shortcut on the desktop (or alsewhere) where the user con
say the name of the file to operate on??
is there a way to make the shortcut's command line to ask for the %1 and %2,
before it executes copy.bat???

thanks
 
=?Utf-8?B?Q2FybG9z?= said:
I'm working with MS-DOS batch files (.bat), and i'm trying to make them easy
to use for users.

if the copy.bat file is like this

rem copy.bat
echo coping from %1 to %2
copy %1name.txt %2name.txt
echo OK

how can I make a shortcut on the desktop (or alsewhere) where the user con
say the name of the file to operate on??
is there a way to make the shortcut's command line to ask for the %1 and %2,
before it executes copy.bat???

thanks
--
Carlos

I thiink you would find it easier and ultimately more productive to use a scripting language rather than batch files. One possibility in windows is VBScript which is fairly easy to use once you get started, or AutoIt which I think is even easier to use but is not provided with Windows (it is free, however). They have the advantage of working within the Windows GUI for input/output and your users may fin that easier that entering data at a DOS command line.
 
Thanks, rick

But my problem isn't about batch file by themselfs...

I need a desktop shortcut that can "ask" the user for a parameter to use in
a batch file...
for ex: id a command line for a coprem.bat acepts %1 and %2, how do i create
the shortcut so the user can input those two parameters, from a desktop
shortcut that as copren.bat as a command??
 
Forget the idea about the SHORTCUT asking the user anything. The batch file
does it, the shortcut is JUST a link to the batch....

Here's examples:
http://www.robvanderwoude.com/userinput.html


--
Tumppi
=================================
Most learned on these newsgroups
Helsinki, FINLAND
(translations from/to FI not always accurate
=================================
 
Hi,

In the link I gave you, click on batch files in the left column, then on
"How to..." and it describes the process used to gather variable user input.

--
Best of Luck,

Rick Rogers, aka "Nutcase" - Microsoft MVP

Windows help - www.rickrogers.org
 
Back
Top