Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Batch File Help again...
Old 06-14-2007, 10:21 PM Batch File Help again...
Brian07002's Avatar
Defies a Status

Posts: 2,162
Name: ...
Location: ...
Trades: 0
Hi,

Yesterday, I posted a question on how to open a popup in a batch file when an operation completes...Being that this was too much for me to figure out...I came up with this new sort of simple code (so far) to email me when it's complete:

Code:
@ECHO OFF
START mailto:me@mydomain.com?subject=Test^&body=This%%20is%%20just%%20a%%20test.
two problems now exist here...

1. How do I send it automatically (without having to push send)

2. And how could this email be launched based on a statement in the batch file? Another words, you have:

Code:
@for %%d in (a,b) do copy file.txt %%d:\
I would want an email after that above code has completed.

Thank you again.
__________________
Made2Own

Please login or register to view this content. Registration is FREE
Brian07002 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-14-2007, 11:26 PM Re: Batch File Help again...
Brian07002's Avatar
Defies a Status

Posts: 2,162
Name: ...
Location: ...
Trades: 0
Hi,

Quote:
I downloaded Mailsend knowing that (from my knowledge) it's impossible to do unattended emails from a batch file without using an external command line tool, so I went with mailsend...
I just downloaded a program called Mailsend and it works, but I need to have the results sent to me via email...I have asked Jim, the author of the program if it could email me the results of a variable inside the script and he says:

Quote:
Yes, but the variable would be along the lines of %d% ...

That's not a function of MailSend ... it's the way the batch
interpreter modifies the line before executing it.
Could someone help me accomplish this?

I would want the result of this to be sent back to me...

Code:
@for %%d in (a,b) do copy file.txt %%d:\
Example...file.txt was successfully copied to drive a: or drive b:

This email will simply let me know if a file was copied to one of those drives or not.

Thank you
__________________
Made2Own

Please login or register to view this content. Registration is FREE

Last edited by Brian07002; 06-14-2007 at 11:54 PM..
Brian07002 is offline
Reply With Quote
View Public Profile
 
Old 06-16-2007, 04:45 PM Re: Batch File Help again...
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Brian what you are needing to do (in your three questions) is really going outside the limits of batch files.

You should be moving up to the newer and more versatile WSH (Windows Script Host)
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Batch File Help again...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.86403 seconds with 12 queries