PC Review


Reply
Thread Tools Rate Thread

Batch file question

 
 
qq
Guest
Posts: n/a
 
      7th Dec 2009
Hi All,

I am writing a batch file for my clients, I called copyfolder.bat. In the
batch file, I run Robocopy to copy folder to another location. I know I can
set %1 in copyfolder.bat, then client can typ copyfolder.bat foldername in
command prompt sceen to run. But the client wants to have a icon on desktop
and wants to get prompt to show him, for example, I setup copyfolder.bat icon
on the desktop, when the client click the icon, then another screen come up
and asking questions: Please type folder name: , then, the client type folder
name, Enter, then, run.

I don't know how to input the folder name and how to transfer the folder
name to my batch file.

Can any body help me out? thanks a lot.

--qq
 
Reply With Quote
 
 
 
 
Pegasus [MVP]
Guest
Posts: n/a
 
      8th Dec 2009

"qq" <(E-Mail Removed)> wrote in message
news:86BAE21D-3A9B-43F7-BC10-(E-Mail Removed)...
> Hi All,
>
> I am writing a batch file for my clients, I called copyfolder.bat. In the
> batch file, I run Robocopy to copy folder to another location. I know I
> can
> set %1 in copyfolder.bat, then client can typ copyfolder.bat foldername in
> command prompt sceen to run. But the client wants to have a icon on
> desktop
> and wants to get prompt to show him, for example, I setup copyfolder.bat
> icon
> on the desktop, when the client click the icon, then another screen come
> up
> and asking questions: Please type folder name: , then, the client type
> folder
> name, Enter, then, run.
>
> I don't know how to input the folder name and how to transfer the folder
> name to my batch file.
>
> Can any body help me out? thanks a lot.
>
> --qq


Here you go:
@echo off
set /p folder=Please enter the folder name:
if "%folder%"=="" goto :eof
echo Processing "%folder%". Please wait.

Or if you want something a little snazzier:
[1] @echo off
[2] echo > c:\input.vbs wscript.echo Inputbox("Please enter the folder
name:")
[3] for /F "delims=" %%a in ('cscript //nologo c:\input.vbs') do set
folder=%%a
[4] if "%folder%"=="" goto :eof
[5] echo Processing "%folder%". Please wait.

Remember to unwrapped any line that your newsreader might have wrapped
around and to remove the line numbers.


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Batch file question tonysathre Windows XP General 3 30th Aug 2006 11:05 PM
Batch file question Brother Brock Windows XP General 4 20th Aug 2005 09:20 PM
VB exe and batch file question. =?Utf-8?B?S2FubmFuLlYgW01DU0QubmV0XQ==?= Microsoft VB .NET 1 8th Aug 2005 02:55 PM
Batch file question =?Utf-8?B?QW5nZWxh?= Microsoft Windows 2000 3 16th Dec 2004 06:01 PM
XP batch file question Mary Windows XP General 1 16th Dec 2004 08:48 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:18 PM.