Discussion:
how to blat user interaction request email address.
(too old to reply)
tzanchanim2000
2003-07-11 21:05:32 UTC
Permalink
Hi all,

I would like to execute a batch file which prompts a user to enter
their email address so a file will be sent to them notfying them of a
task completion. I would prefer it to ask them in the very begining
before anything is executed. Below is what I have which executes
automatically:

xcopy E:\D3Database
E:\D3DatabaseCopy /E /y /v /F>C:\BatchLogs\D3copy.txt
c:\blat194\blat - -body "See Attachment" -to
***@watersaversinc.com -server mail.aawsom.net -port 25 -f
***@watersaversinc.com -u markg%%watersaversinc.com -pw ****** -
subject "D3 Database Copy" -attach "C:\BatchLogs\D3Copy.txt"
Del C:\Batchlogs\D3copy.txt

I am not up on how to create user interaction with batch files. So if
it would not be too dificult could someone could please alter it so
that it would prompt for an email address?

Thank you in advance,

Mark




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Free shipping on all inkjet cartridge & refill kit orders to US & Canada.
We have your brand: HP, Epson, Lexmark, Canon & more.
http://www.c1tracking.com/l.asp?cid=5510
http://us.click.yahoo.com/kP..SB/49VGAA/ySSFAA/dkFolB/TM
---------------------------------------------------------------------~->
Chip
2003-07-11 21:18:57 UTC
Permalink
Post by tzanchanim2000
Hi all,
I would like to execute a batch file which prompts a user to enter
their email address so a file will be sent to them notfying them of a
task completion. I would prefer it to ask them in the very begining
before anything is executed. Below is what I have which executes
xcopy E:\D3Database
E:\D3DatabaseCopy /E /y /v /F>C:\BatchLogs\D3copy.txt
c:\blat194\blat - -body "See Attachment" -to
subject "D3 Database Copy" -attach "C:\BatchLogs\D3Copy.txt"
Del C:\Batchlogs\D3copy.txt
I am not up on how to create user interaction with batch files. So if
it would not be too dificult could someone could please alter it so
that it would prompt for an email address?
Thank you in advance,
Mark
Batch files alone cannot get user input. You need a program that can ask
for input, then write that to a file which can be used with the -tf option.
Sorry, I do not have one handy, but can probably whip one out in assembly
tonight.

Chip


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Free shipping on all inkjet cartridge & refill kit orders to US & Canada.
We have your brand: HP, Epson, Lexmark, Canon & more.
http://www.c1tracking.com/l.asp?cid=5510
http://us.click.yahoo.com/kP..SB/49VGAA/ySSFAA/dkFolB/TM
---------------------------------------------------------------------~->
Sensei J. Richard Kirkham B.Sc
2003-07-12 08:45:03 UTC
Permalink
You can using start and notepad on one batch file and
setting that as the variable but it's hokey. I used to
do it with a copybydate.bat I used before I started
using autoit.

Rick
Post by Chip
Batch files alone cannot get user input. You need a
program that can ask
for input, then write that to a file which can be
used with the -tf option.
Sorry, I do not have one handy, but can probably
whip one out in assembly
tonight.
Chip
------------------------ Yahoo! Groups Sponsor
http://groups.yahoo.com/group/blat
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
=====
http://kirkhamsebooks.tripod.com/RaisingYourChild_in.html
http://kirkhamsmartialarts.tripod.com/martialarts_ezine.html
http://kirkhamsmartialarts.tripod.com/ebooksvideoscassettes.htm Obesity in Children, Anger Management, Internal Energy Strikes, meditation & More & NOW Raising Your Child to be More Postive and More Confident
http://kirkhamsmartialarts.tripod.com/sellmyebooks
http://kirkhamsmartialarts.tripod.com/qualifications
http://SeriousMartialArtistsOnly.8m.com The Combat Martial Arts Ezine

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/sOykFB/k9VGAA/ySSFAA/dkFolB/TM
---------------------------------------------------------------------~->
Tim Musson
2003-07-15 12:09:47 UTC
Permalink
Hey tzanchanim2000,

My MUA believes you used eGroups-EW/0.82
to write the following on Friday, July 11, 2003 at 5:05:32 PM.

t> I am not up on how to create user interaction with batch files. So if
t> it would not be too dificult could someone could please alter it so
t> that it would prompt for an email address?

I do something similar with the 'format' command... Interesting trick I
found on the web. By the way, there is no way to check what was entered
was an eMail address...

,----- [ ]
@echo off

::Put keyboard input in an environment variable
:: using only standard Win32 components.
::This uses 'format' and 'find'

::Ask for the input
Echo.Please enter your eMail address.

::Accept the input and put it in a variable
for /f "tokens=*" %%a in ('format/f:160 a: ^|find "..."') do set Input=%%a

::fix the variable to keep only what was entered
set Input=%Input:~30%

::Here is how you can use the variable
Echo.
Echo.You entered "%Input%" for your eMail address...
Echo.
pause
`-----
--
Tim Musson
Flying with The Bat! eMail v1.62q
Windows 2000 5.0.2195 (Service Pack 2)
Always remember you're unique, just like everyone else.
Blat @ www.blat.net


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Control Hunger EZ with fast acting oral EZ Appetite Suppressant Spray
from VitaminBoost.com. 1 Month Supply - 2oz., 80 sprays: $19.97.
http://www.challengerone.com/t/l.asp?cid=2866&lp=ezappetite3.html
http://us.click.yahoo.com/aSJFwB/XWXGAA/ySSFAA/dkFolB/TM
---------------------------------------------------------------------~->
Mark Gilbert
2003-07-16 15:51:54 UTC
Permalink
I got this from Yahoo group Batchworld. They are very helpful for
integrating blat in batch files.

/p uname=What is your email address?

xcopy E:\D3Database E:\D3DatabaseCopy /E /y /v
/F>C:\BatchLogs\D3copy.txt
c:\blat194\blat - -body "See Attachment" -to %uname% -server
mail.aawsom.net -port 25 -f ***@test.com -u markg%%test.com -pw
******* -subject "D3 Database Copy" -attach "C:\BatchLogs\D3Copy.txt"
Del C:\Batchlogs\D3copy.txt
set uname=

-----Original Message-----
From: Tim Musson [mailto:***@sdf.lonestar.org]
Sent: Tuesday, July 15, 2003 5:10 AM
To: tzanchanim2000
Subject: Re: [blat] how to blat user interaction request email address.

Hey tzanchanim2000,

My MUA believes you used eGroups-EW/0.82
to write the following on Friday, July 11, 2003 at 5:05:32 PM.

t> I am not up on how to create user interaction with batch files. So if

t> it would not be too dificult could someone could please alter it so
t> that it would prompt for an email address?

I do something similar with the 'format' command... Interesting trick I
found on the web. By the way, there is no way to check what was entered
was an eMail address...

,----- [ ]
@echo off

::Put keyboard input in an environment variable
:: using only standard Win32 components.
::This uses 'format' and 'find'

::Ask for the input
Echo.Please enter your eMail address.

::Accept the input and put it in a variable
for /f "tokens=*" %%a in ('format/f:160 a: ^|find "..."') do set
Input=%%a

::fix the variable to keep only what was entered
set Input=%Input:~30%

::Here is how you can use the variable
Echo.
Echo.You entered "%Input%" for your eMail address...
Echo.
pause
`-----
--
Tim Musson
Flying with The Bat! eMail v1.62q
Windows 2000 5.0.2195 (Service Pack 2)
Always remember you're unique, just like everyone else.
Blat @ www.blat.net





Yahoo! Groups Sponsor


ADVERTISEMENT

<http://rd.yahoo.com/M=194081.3551198.4824677.1261774/D=egroupweb/S=1705
007389:HM/A=1663535/R=0/SIG=11ps6rfef/*http:/www.ediets.com/start.cfm?co
de=30504&media=atkins> click here


<http://us.adserver.yahoo.com/l?M=194081.3551198.4824677.1261774/D=egrou
pmail/S=:HM/A=1663535/rand=904529645>
Tim Musson
2003-07-16 16:39:31 UTC
Permalink
Hey Mark,

My MUA believes you used Microsoft Outlook, Build 10.0.2616
to write the following on Wednesday, July 16, 2003 at 11:51:54 AM.

MG> I got this from Yahoo group Batchworld. They are very helpful for
MG> integrating blat in batch files.

MG> /p uname=What is your email address?

Looks like something didn't make it to your eMail. You can't start a
line in a batch file with "/p"...
--
Tim Musson
Flying with The Bat! eMail v1.62q
Windows 2000 5.0.2195 (Service Pack 2)
...If you try to fail, and succeed, which have you done?
Blat @ www.blat.net


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Coral Calcium for Greater Health. 1 month supply - $23.95
(1 bottle, 90 tablets, 400mg each with Magnesium & Vitamin D)
http://www.challengerone.com/t/l.asp?cid=2805&lp=calcium2.asp
http://us.click.yahoo.com/mcIe3D/v9VGAA/ySSFAA/dkFolB/TM
---------------------------------------------------------------------~->
Tim Musson
2003-07-16 17:06:16 UTC
Permalink
Hey Tim,

My MUA believes you used The Bat! (v1.62q) Personal
to write the following on Wednesday, July 16, 2003 at 12:39:31 PM.

MG>> /p uname=What is your email address?

TM> Looks like something didn't make it to your eMail. You can't start a
TM> line in a batch file with "/p"...

Ah, I got it, that is a

set /p eMail=Your eMail?

then the set /p command asks for keyboard input and puts it in the var!

Cool!

Can anyone tell me if this works on Win95/8/me? It worked on my 2k, so I
expect it will also work on xp (can anyone verify?).
--
Tim Musson
Flying with The Bat! eMail v1.62q
Windows 2000 5.0.2195 (Service Pack 2)
Do Not Meddle In The Affairs Of Dragons For You Are Crunchy And Good
With Ketchup.
Blat @ www.blat.net


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Naturally Painless & Spray Away Backaches & Joint Pain. $19.97
http://www.challengerone.com/t/l.asp?cid=2867&lp=m331.html
http://us.click.yahoo.com/tJIe0D/79VGAA/ySSFAA/dkFolB/TM
---------------------------------------------------------------------~->
Peter Kronfuss
2003-07-16 18:12:11 UTC
Permalink
Post by Tim Musson
set /p eMail=Your eMail?
then the set /p command asks for keyboard input and puts it in the var!
Cool!
Can anyone tell me if this works on Win95/8/me? It worked on my 2k, so I
expect it will also work on xp (can anyone verify?).
I have tested it on WinXP it also works there! (Sorry can't verify it on
Win9x/me)

cu
Peet


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Free shipping on all inkjet cartridge & refill kit orders to US & Canada. Low prices up to 80% off. We have your brand: HP, Epson, Lexmark & more.
http://www.c1tracking.com/l.asp?cid=5510
http://us.click.yahoo.com/GHXcIA/n.WGAA/ySSFAA/dkFolB/TM
---------------------------------------------------------------------~->
Elias Alejandro Morales Torres
2003-07-16 18:40:33 UTC
Permalink
It do not works on WinNT
----- Original Message -----
From: Tim Musson
To: Tim Musson
Sent: Wednesday, July 16, 2003 12:06
Subject: Re: [blat] how to blat user interaction request email address.


Hey Tim,

My MUA believes you used The Bat! (v1.62q) Personal
to write the following on Wednesday, July 16, 2003 at 12:39:31 PM.

MG>> /p uname=What is your email address?

TM> Looks like something didn't make it to your eMail. You can't start a
TM> line in a batch file with "/p"...

Ah, I got it, that is a

set /p eMail=Your eMail?

then the set /p command asks for keyboard input and puts it in the var!

Cool!

Can anyone tell me if this works on Win95/8/me? It worked on my 2k, so I
expect it will also work on xp (can anyone verify?).

--
Tim Musson
Flying with The Bat! eMail v1.62q
Windows 2000 5.0.2195 (Service Pack 2)
Do Not Meddle In The Affairs Of Dragons For You Are Crunchy And Good
With Ketchup.
Blat @ www.blat.net


Yahoo! Groups Sponsor
ADVERTISEMENT




Community email addresses:
Post message: ***@yahoogroups.com
Subscribe: blat-***@yahoogroups.com
Unsubscribe: blat-***@yahoogroups.com
List owner: blat-***@yahoogroups.com

Shortcut URL to this page:
http://groups.yahoo.com/group/blat

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


[Non-text portions of this message have been removed]


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Coral Calcium for Greater Health. 1 month supply - $23.95
(1 bottle, 90 tablets, 400mg each with Magnesium & Vitamin D)
http://www.challengerone.com/t/l.asp?cid=2805&lp=calcium2.asp
http://us.click.yahoo.com/mcIe3D/v9VGAA/ySSFAA/dkFolB/TM
---------------------------------------------------------------------~->
loosegroove2000
2003-07-16 19:10:25 UTC
Permalink
Post by Tim Musson
Can anyone tell me if this works on Win95/8/me?
I can not get it to work on Win 98.
--
Bronson C. Elliott


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Free shipping on all inkjet cartridge & refill kit orders to US & Canada. Low prices up to 80% off. We have your brand: HP, Epson, Lexmark & more.
http://www.c1tracking.com/l.asp?cid=5510
http://us.click.yahoo.com/GHXcIA/n.WGAA/ySSFAA/dkFolB/TM
---------------------------------------------------------------------~->
Mark Gilbert
2003-07-16 19:17:12 UTC
Permalink
Check out XSET http://xset.tripod.com/

-----Original Message-----
From: loosegroove2000 [mailto:***@yahoo.com]
Sent: Wednesday, July 16, 2003 12:10 PM
To: ***@yahoogroups.com
Subject: [blat] Re: how to blat user interaction request email address.
Post by Tim Musson
Can anyone tell me if this works on Win95/8/me?
I can not get it to work on Win 98.
--
Bronson C. Elliott





Yahoo! Groups Sponsor


ADVERTISEMENT

<http://rd.yahoo.com/M=194081.3551198.4824677.1261774/D=egroupweb/S=1705
007389:HM/A=1663535/R=0/SIG=11ps6rfef/*http:/www.ediets.com/start.cfm?co
de=30504&media=atkins> click here


<http://us.adserver.yahoo.com/l?M=194081.3551198.4824677.1261774/D=egrou
pmail/S=:HM/A=1663535/rand=173990044>
Tim Musson
2003-07-18 19:07:40 UTC
Permalink
Hey Tim,

My MUA believes you used The Bat! (v1.62q) Personal
to write the following on Wednesday, July 16, 2003 at 1:06:16 PM.

TM> set /p eMail=Your eMail?

TM> then the set /p command asks for keyboard input and puts it in the
TM> var!

TM> Can anyone tell me if this works on Win95/8/me? It worked on my 2k,
TM> so I expect it will also work on xp (can anyone verify?).

Well, it looks like it only works in Win2k and later...
--
Tim Musson
Flying with The Bat! eMail v1.62q
Windows 2000 5.0.2195 (Service Pack 2)
Ever stop to think, and forget to start again?
Blat @ www.blat.net


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Free shipping on all inkjet cartridge & refill kit orders to US & Canada. Low prices up to 80% off. We have your brand: HP, Epson, Lexmark & more.
http://www.c1tracking.com/l.asp?cid=5510
http://us.click.yahoo.com/GHXcIA/n.WGAA/ySSFAA/dkFolB/TM
---------------------------------------------------------------------~->
Mark Gilbert
2003-07-16 17:10:01 UTC
Permalink
Sorry.. missed part of the statement in the email.

set /p uname=What is your email address?

-----Original Message-----
From: Tim Musson [mailto:***@sdf.lonestar.org]
Sent: Wednesday, July 16, 2003 9:40 AM
To: Mark Gilbert
Subject: Re: [blat] how to blat user interaction request email address.

Hey Mark,

My MUA believes you used Microsoft Outlook, Build 10.0.2616
to write the following on Wednesday, July 16, 2003 at 11:51:54 AM.

MG> I got this from Yahoo group Batchworld. They are very helpful for
MG> integrating blat in batch files.

MG> /p uname=What is your email address?

Looks like something didn't make it to your eMail. You can't start a
line in a batch file with "/p"...
--
Tim Musson
Flying with The Bat! eMail v1.62q
Windows 2000 5.0.2195 (Service Pack 2)
...If you try to fail, and succeed, which have you done?
Blat @ www.blat.net





Yahoo! Groups Sponsor


ADVERTISEMENT

<http://rd.yahoo.com/M=194081.3551198.4824677.1261774/D=egroupweb/S=1705
007389:HM/A=1663535/R=0/SIG=11ps6rfef/*http:/www.ediets.com/start.cfm?co
de=30504&media=atkins> click here


<http://us.adserver.yahoo.com/l?M=194081.3551198.4824677.1261774/D=egrou
pmail/S=:HM/A=1663535/rand=963954861>
Sensei J. Richard Kirkham B.Sc
2003-07-18 18:58:38 UTC
Permalink
Kewl

Rick
Post by Mark Gilbert
Sorry.. missed part of the statement in the email.
set /p uname=What is your email address?
=====
http://kirkhamsebooks.tripod.com/RaisingYourChild_in.html
http://kirkhamsmartialarts.tripod.com/martialarts_ezine.html
http://kirkhamsmartialarts.tripod.com/ebooksvideoscassettes.htm Obesity in Children, Anger Management, Internal Energy Strikes, meditation & More & NOW Raising Your Child to be More Postive and More Confident
http://kirkhamsmartialarts.tripod.com/sellmyebooks
http://kirkhamsmartialarts.tripod.com/qualifications
http://SeriousMartialArtistsOnly.8m.com The Combat Martial Arts Ezine

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges & Refill Kits for Your Epson at Myinks.com
Free shipping on orders $50 or more to the US and Canada.
http://www.c1tracking.com/l.asp?cid=5705&lp=home/epson.asp
http://us.click.yahoo.com/brYXfA/_xWGAA/ySSFAA/dkFolB/TM
---------------------------------------------------------------------~->
Continue reading on narkive:
Loading...