Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss
Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

wait copy ftp

838 views
Skip to first unread message

Leon Sharp

unread,
Jul 3, 2012, 11:38:00 PM7/3/12
to
Tryin to create a batch file to wait for a file from a local drive then once the file come in (*.txt) make a copy then ftp it to a server

Thank you in advance,

foxidrive

unread,
Jul 3, 2012, 11:44:42 PM7/3/12
to
On Wednesday 04/07/2012 13:38, Leon Sharp wrote:
> Tryin to create a batch file to wait for a file from a local drive then once the file come in (*.txt) make a copy then ftp it to a server

Google will find you the way to script an FTP transfer.

Your batch file will look like this:

@echo off
:loop

if exist file.txt (
ftp transfer here
)

ping -n 60 localhost >nul
goto :loop





--
Mic


Leon Sharp

unread,
Jul 4, 2012, 12:04:12 AM7/4/12
to
That seems a little to simple!
So I would need to have it wait for the file, which could be several times a day, then copy it to another folder then ftp it out, then finally send me an email stating this was done. I have a copy of a batch i was working on but left it at the office computer.

so lets say the file i am waiting for is c:\temp\file.txt
once that file becomes available I would like to make a copy to c:\temp\backup\file.txt
then ftp that file out to a server \\server.com\filedepot\file.txt
then send me an email that this was successfully done. :/

Thanks in advance

foxidrive

unread,
Jul 4, 2012, 12:20:54 AM7/4/12
to
What did your last slave die of? :)


@echo off
:loop
if exist "c:\temp\file.txt" (
copy command here
ftp transfer here
email command with errorlevel here

JJ

unread,
Jul 4, 2012, 12:39:31 AM7/4/12
to
foxidrive <foxi...@gotcha.woohoo.invalid> wrote:

> @echo off
>:loop
> if exist "c:\temp\file.txt" (
> copy command here
> ftp transfer here
> email command with errorlevel here
> )
> ping -n 60 localhost >nul
> goto :loop

While ftp is available in Windows, email sending is not. I thought I could
find one from cygwin, gnuwin32 or mingw. But they don't seem to have one.
Do you have any suggestion for a command-line email sending?

foxidrive

unread,
Jul 4, 2012, 12:45:06 AM7/4/12
to
Yes, Blat is free.

--
Mic


Leon Sharp

unread,
Jul 5, 2012, 9:08:48 AM7/5/12
to
I use postie...

Todd Vargo

unread,
Jul 5, 2012, 4:40:42 PM7/5/12
to
On 7/4/2012 12:20 AM, foxidrive wrote:
>
> @echo off
> :loop
> if exist "c:\temp\file.txt" (
> copy command here
> ftp transfer here
> email command with errorlevel here
> )
> ping -n 60 localhost >nul
> goto :loop

With no indication of how the file arrives in the folder and although
the file may exist, it may not be finished being written. I would
suggest storing the file size, delay for a period, then check the file
size again before moving on to the copy and other stuff.

--
Todd Vargo
(Post questions to group only. Remove "z" to email personal messages)


foxidrive

unread,
Jul 5, 2012, 8:43:20 PM7/5/12
to
On Friday 06/07/2012 06:40, Todd Vargo wrote:
> On 7/4/2012 12:20 AM, foxidrive wrote:
>>
>> @echo off
>> :loop
>> if exist "c:\temp\file.txt" (
>> copy command here
>> ftp transfer here
>> email command with errorlevel here
>> )
>> ping -n 60 localhost >nul
>> goto :loop
>
> With no indication of how the file arrives in the folder and although
> the file may exist, it may not be finished being written. I would
> suggest storing the file size, delay for a period, then check the file
> size again before moving on to the copy and other stuff.

True. The OP would know if it is a large file, and a slow transfer like FTP.

If it is a fast file system copy then a simple delay before the copy command would solve that in normal operation.


--
Mic


noel....@gmail.com

unread,
Jul 5, 2012, 9:58:29 PM7/5/12
to
Todd, I forgot about, how about setting up a trigger file? Could that help me? The file will be created locally after a process is ran. Guys I may be asking for a lot, but this is really my first batch file. Any help in setting this up is greatly appreciated. Thanks Foxidrive for your help so far.

@echo off
:loop
if exist "c:\temp\file.txt" (
copy c:\temp\file.txt c:\temp\store\file.txt

::ftp transfer here

::email command with errorlevel here (not sure how to setup with error level)
postie -host:<SMTPSERVER> -to:<TOADDRESS> -from:<FROMADDRESS> -s:"<SUBJECT>" -msg:"file.txt has been ftp'd"

)
ping -n 60 localhost >nul
goto :loop

What you think almost getting there? :/

foxidrive

unread,
Jul 5, 2012, 10:36:14 PM7/5/12
to
On Friday 06/07/2012 11:58, noel....@gmail.com wrote:
> Todd, I forgot about, how about setting up a trigger file? Could that help me? The file will be created locally after a process is ran. Guys I may be asking for a lot, but this is really my first batch file. Any help in setting this up is greatly appreciated. Thanks Foxidrive for your help so far.
>
>
> What you think almost getting there? :/

Here's a bit more meat - Untested:

FTP.EXE doesn't return errorlevels so you will need to check the log file to see if the transfer succeeded.
If there is specific text showing that it succeeded then you can check that using FIND.EXE and modify the message being sent.


@echo off
set server_name=FTP.server.name
set username=username
set password=password
set remote_directory=/folder/abc/def
set "filename=c:\temp\file.txt"
set "target=c:\temp\store\"

:loop
if exist "%filename%" (
ping -n 60 localhost >nul
copy /b "%filename%" "%target%"

rem ftp transfer here
(
echo open %server_name%
echo %username%
echo %password%
echo cd %remote_directory%
echo put "%filename%"
echo quit
)>list.ftp

echo %date% %time% >>ftp.log
echo ========================= >>ftp.log
FTP -s:list.ftp >>ftp.log
echo ========================= >>ftp.log


rem email command with errorlevel here (not sure how to setup with error level)
postie -host:<SMTPSERVER> -to:<TOADDRESS> -from:<FROMADDRESS> -s:"<SUBJECT>" -msg:"%filename% has been ftp'd'"

del list.ftp 2>nul

)
ping -n 60 localhost >nul
goto :loop





--
Mic


noel....@gmail.com

unread,
Jul 5, 2012, 9:44:54 PM7/5/12
to
Todd, I forgot about, how about setting up a trigger file? Could that help me? The file will be created locally after a process is ran. Guys I may be asking for a lot, but this is really my first batch file. Any help in setting this up is greatly appreciated. Thanks Foxidrive for your help so far.

@echo off
:loop
if exist "c:\temp\file.txt" (
copy c:\temp\file.txt c:\temp\store\file.txt

::ftp transfer here

::email command with errorlevel here (not sure how to setup with error level)
postie -host:<SMTPSERVER> -to:<TOADDRESS> -from:<FROMADDRESS> -s:"<SUBJECT>" -msg:"file.txt has been ftp'd"

)
ping -n 60 localhost >nul
goto :loop

Leon Sharp

unread,
Jul 5, 2012, 11:16:23 PM7/5/12
to
I will test this first thing in the morning THANK YOU.

Zaidy036

unread,
Jul 6, 2012, 11:15:11 AM7/6/12
to
Leon Sharp <leonsh...@gmail.com> wrote:
> I will test this first thing in the morning THANK YOU.

Task manager should have an FTB process that can be checked for and watched
for completion.

Petr Laznovsky

unread,
Jul 6, 2012, 5:04:35 PM7/6/12
to

Leon Sharp

unread,
Jul 6, 2012, 10:01:13 PM7/6/12
to
Zaidy036, i dont understand.

Todd Vargo

unread,
Jul 6, 2012, 10:42:05 PM7/6/12
to
On 7/5/2012 9:44 PM, noel....@gmail.com wrote:
> On Thursday, July 5, 2012 4:40:42 PM UTC-4, Todd Vargo wrote:
>> On 7/4/2012 12:20 AM, foxidrive wrote:
>>>
>>> @echo off
>>> :loop
>>> if exist "c:\temp\file.txt" (
>>> copy command here
>>> ftp transfer here
>>> email command with errorlevel here
>>> )
>>> ping -n 60 localhost >nul
>>> goto :loop
>>
>> With no indication of how the file arrives in the folder and although
>> the file may exist, it may not be finished being written. I would
>> suggest storing the file size, delay for a period, then check the file
>> size again before moving on to the copy and other stuff.
>>
>> --
>> Todd Vargo
>> (Post questions to group only. Remove "z" to email personal messages)
>
> Todd, I forgot about, how about setting up a trigger file? Could that help me? The file will be created locally after a process is ran.

Sure, that will be fine and eliminates guessing if the target file is
complete. So how is the target file being created? That may indicate if
a trigger file is even needed.

Leon Sharp

unread,
Jul 6, 2012, 11:37:40 PM7/6/12
to
On Friday, July 6, 2012 10:42:05 PM UTC-4, Todd Vargo wrote:
The file is being created from a process a user runs to create the file. The file is placed in the c:\temp folder. Its a pretty small file and its a .txt file.

Timo Salmi

unread,
Jul 7, 2012, 2:28:47 AM7/7/12
to
On 07.07.2012 00:04 Petr Laznovsky <nob...@nowhere.com> wrote:
> http://retired.beyondlogic.org/solutions/cmdlinemail/cmdlinemail.htm

Interesting. But the file is flagged by Avira antivirus. "Contains
recognition pattern of the SPR/Emailer program".

All the best, Timo

--
Prof. (emer.) Timo Salmi, Vaasa, Finland.
http://www.netikka.net/tsneti/homepage.php

foxidrive

unread,
Jul 7, 2012, 3:01:48 AM7/7/12
to
On Saturday 07/07/2012 16:28, Timo Salmi wrote:
> On 07.07.2012 00:04 Petr Laznovsky <nob...@nowhere.com> wrote:
>> http://retired.beyondlogic.org/solutions/cmdlinemail/cmdlinemail.htm
>
> Interesting. But the file is flagged by Avira antivirus. "Contains
> recognition pattern of the SPR/Emailer program".
>

The Avira forum is not very descriptive and don't say it is malware or not, just that it will not be reclassified.
http://forum.avira.com/wbb/index.php?page=Thread&threadID=128188


But many command line tools are flagged as malware these days: cmdow is one that is flagged as malware and I've had many others that I know are not malware - just that they can be used in tricky ways, as CMDOW can launch hidden windows etc.

The AV industry thrives on scaring people, hence the huge banners. They want people to buy the full product.


--
Mic


JJ

unread,
Jul 7, 2012, 3:24:09 AM7/7/12
to
Timo Salmi <t...@uwasa.fi> wrote:

> Interesting. But the file is flagged by Avira antivirus. "Contains
> recognition pattern of the SPR/Emailer program".

Well, it IS an emailer after all. Most antiviruses would catch it due to
hueristic scanning. It's smart for detecting what a program can do, but it
doesn't know s**t whether a program is legit or not. The reason why they
don't flag Thunderbird (or any other popular programs) is because they
have a database of known legit programs.

Timo Salmi

unread,
Jul 7, 2012, 3:36:21 AM7/7/12
to
On 07.07.2012 10:01 foxidrive wrote:
> On Saturday 07/07/2012 16:28, Timo Salmi wrote:
>> On 07.07.2012 00:04 Petr Laznovsky <nob...@nowhere.com> wrote:
>>> http://retired.beyondlogic.org/solutions/cmdlinemail/cmdlinemail.htm

>> Interesting. But the file is flagged by Avira antivirus. "Contains
>> recognition pattern of the SPR/Emailer program".

> The Avira forum is not very descriptive and don't say it is malware
> or not, just that it will not be reclassified.
> http://forum.avira.com/wbb/index.php?page=Thread&threadID=128188

This is not an insurmountable problem as such, since the scanner
accepts user's exceptions.

> But many command line tools are flagged as malware these days: cmdow
> is one that is flagged as malware and I've had many others that I
> know are not malware

The problem here is that since many scanners have the same (potential,
I'm not taking a stand) false positives, email sent by such a program is
likely to be rejected at the receiver's end by his/her ISP's scanners.

(Although this sideline is virus related, the discussion also relates to
command line tools and is thus on topic.)

All the best, Timo

--
Prof. (emer.) Timo Salmi, Vaasa, Finland.
http://www.netikka.net/tsneti/homepage.php
CMD script tricks http://www.netikka.net/tsneti/info/tscmd.php

Todd Vargo

unread,
Jul 7, 2012, 8:07:57 AM7/7/12
to
On 7/6/2012 11:37 PM, Leon Sharp wrote:
> On Friday, July 6, 2012 10:42:05 PM UTC-4, Todd Vargo wrote:
>>
>> Sure, that will be fine and eliminates guessing if the target file is
>> complete. So how is the target file being created? That may indicate if
>> a trigger file is even needed.
>
> The file is being created from a process a user runs to create the file. The file is placed in the c:\temp folder. Its a pretty small file and its a .txt file.

The rabbit hole keeps leading us down an ever opaque discussion.

foxidrive

unread,
Jul 7, 2012, 8:13:11 AM7/7/12
to
On Saturday 07/07/2012 22:07, Todd Vargo wrote:
> On 7/6/2012 11:37 PM, Leon Sharp wrote:
>> On Friday, July 6, 2012 10:42:05 PM UTC-4, Todd Vargo wrote:
>>>
>>> Sure, that will be fine and eliminates guessing if the target file is
>>> complete. So how is the target file being created? That may indicate if
>>> a trigger file is even needed.
>>
>> The file is being created from a process a user runs to create the file. The file is placed in the c:\temp folder. Its a pretty small file and its a .txt file.
>
> The rabbit hole keeps leading us down an ever opaque discussion.
>

I think the question should be: does it take longer than 10 seconds to create the file?


The code I posted delays for 60 seconds after detecting the file so it should be an ample delay.


--
Mic


Frank P. Westlake

unread,
Jul 7, 2012, 9:14:45 AM7/7/12
to
On 2012-07-07 00:36, Timo Salmi wrote:
> (Although this sideline is virus related, the discussion also relates to
> command line tools and is thus on topic.)

You're initial warning is very much on topic and I thank you for going
to the trouble.

Frank

Zaidy036

unread,
Jul 7, 2012, 11:25:10 AM7/7/12
to
Sorry, using an iPad while traveling and a typo.

I would look for two things for what you are trying (ftp) but not sure if
either are usable:
1. Use Start /Wait command for ftp
2. Watch Task Manager to see if a process is running during ftp that can
then be watched for completion. On a time delay basis using TIMEOUT

Petr Laznovsky

unread,
Jul 7, 2012, 3:33:19 PM7/7/12
to
+1

The program is 17kb size, and did his job well. I can`t realize how
somebody put some additonal evil code inside ;-)

L.

Timo Salmi

unread,
Jul 8, 2012, 1:42:53 AM7/8/12
to
On 07.07.2012 00:04 Petr Laznovsky wrote:
>> Do you have any suggestion for a command-line email sending?
> http://retired.beyondlogic.org/solutions/cmdlinemail/cmdlinemail.htm

Of related interest. Have not tried it, though.
http://www.lewisroberts.com/2006/06/09/sending-cdomessage-with-importance/

All the best, Timo

--
Prof. (emer.) Timo Salmi, Vaasa, Finland
http://www.netikka.net/tsneti/homepage.php
Useful CMD script tricks http://www.netikka.net/tsneti/info/tscmd.php

Petr Laznovsky

unread,
Jul 8, 2012, 5:41:13 PM7/8/12
to
On 4.7.2012 6:39, JJ wrote:
Another one:

http://www.muquit.com/muquit/software/mailsend/mailsend.html


Todd Vargo

unread,
Jul 8, 2012, 6:36:53 PM7/8/12
to
I would like to determine if the unknown process that creates the file
can be wrapped in a script. ISTM, a wrapper would be preferable (if
possible) to leaving a separate batch process running all day. Once the
wrapper option is ruled out, I would then pursue the latter.

BTW, look at the code you posted again. Although OP wanted to COPY the
file to another location, the original file should be MOVEd or deleted.
If you do not remove the file from the original location, the loop will
copy/ftp the same file indefinitely, not only wasting cpu time, but
internet bandwidth as well.

Leon Sharp

unread,
Jul 8, 2012, 8:35:27 PM7/8/12
to
Foxidrive 60 seconds is great. Going to finally test this out. Thanks for your help so far.

foxidrive

unread,
Jul 9, 2012, 12:26:33 AM7/9/12
to
On Monday 09/07/2012 08:36, Todd Vargo wrote:

> BTW, look at the code you posted again. Although OP wanted to COPY the
> file to another location, the original file should be MOVEd or deleted.

Deleted after FTP I expect.

> If you do not remove the file from the original location, the loop will
> copy/ftp the same file indefinitely, not only wasting cpu time, but
> internet bandwidth as well.

Good point and well spotted. :)



--
Mic


Leon Sharp

unread,
Jul 9, 2012, 3:59:57 PM7/9/12
to
Did I say copy... of course I meant move!! ;) testing now... i'll get back at ya.

Thanks

Todd Vargo

unread,
Jul 9, 2012, 6:26:29 PM7/9/12
to
Better stick with adding the delete after ftp. Otherwise, if you replace
COPY with MOVE, you will either have to move it after the ftp or make
several other modifications for the ftp to work.

Leon Sharp

unread,
Jul 9, 2012, 9:40:03 PM7/9/12
to
Todd, yup changed the copy to move. Thinking of adding another value to add date and or time to be able to keep the file but I ll double check if I need to keep it I may not have to which will make it much easier to just delete after FTP. I tested today seems to work okay I keep getting an error while doing the FTP portion. I ll test again and post log.

Thanks all for your input and help. I hope to help others as you helped me. I ll update post tomorrow.

JJ

unread,
Jul 10, 2012, 2:15:17 AM7/10/12
to
Timo Salmi <t...@uwasa.fi> wrote:

> Of related interest. Have not tried it, though.
> http://www.lewisroberts.com/2006/06/09/sending-cdomessage-with-importa
> nce/

That's *very* interesting. I didn't realize Windows actually has an email
library that doesn't need MAPI. It's probably part of IIS. It funny
though, the DLL use one of Outlook Express DLL file.

foxidrive

unread,
Jul 10, 2012, 2:52:37 AM7/10/12
to
Win 7 doesn't have OE any longer.

I had this saved - just tested it in Win 7 and it works.


::bat-email.cmd:::::::::::::::::::::::::::::::::::::::::::::::::::::
@echo off
setlocal
set vbsfile=bat-email.vbs
call :createVBS

:: defaults
set From=m...@here.com.au
set To=y...@lavabit.com
set Subj="email test %date% %time%"
set Body="did it work? %date% %time%"
set Serv=mail.server.com.au
set Auth=user
set Pass=pass

call :send %From% %To% %Subj% %Body% %Serv% %Auth% %Pass%
pause
goto :EOF

:send
cscript.exe %vbsfile% %1 %2 %3 %4 %5 %6 %7
goto :EOF

:createVBS
del %vbsfile% 2>nul
set cdoSchema=http://schemas.microsoft.com/cdo/configuration
echo >>%vbsfile% Set objArgs = WScript.Arguments
echo >>%vbsfile% Set objEmail = CreateObject("CDO.Message")
echo >>%vbsfile% objEmail.From = objArgs(0)
echo >>%vbsfile% objEmail.To = objArgs(1)
echo >>%vbsfile% objEmail.Subject = objArgs(2)
echo >>%vbsfile% objEmail.Textbody = objArgs(3)
echo >>%vbsfile% ' objEmail.AddAttachment "%~f0"
echo >>%vbsfile% with objEmail.Configuration.Fields
echo >>%vbsfile% .Item ("%cdoSchema%/sendusing") = 2 ' not local, smtp
echo >>%vbsfile% .Item ("%cdoSchema%/smtpserver") = objArgs(4)
echo >>%vbsfile% .Item ("%cdoSchema%/smtpserverport") = 25
echo >>%vbsfile% .Item ("%cdoSchema%/smtpauthenticate") = 1 ' cdobasic
echo >>%vbsfile% .Item ("%cdoSchema%/sendusername") = objArgs(5)
echo >>%vbsfile% .Item ("%cdoSchema%/sendpassword") = objArgs(6)
echo >>%vbsfile% .Item ("%cdoSchema%/smtpusessl") = False
echo >>%vbsfile% .Item ("%cdoSchema%/smtpconnectiontimeout") = 25
echo >>%vbsfile% .Update
echo >>%vbsfile% end with
echo >>%vbsfile% objEmail.Send


--
Mic


Timo Salmi

unread,
Jul 10, 2012, 10:43:23 AM7/10/12
to
On 10.07.2012 09:52 foxidrive wrote:
> I had this saved - just tested it in Win 7 and it works.
> ::bat-email.cmd:::::::::::::::::::::::::::::::::::::::::::::::::::::
> @echo off
> setlocal
> set vbsfile=bat-email.vbs
> call :createVBS
(snip)
> :createVBS
> del %vbsfile% 2>nul
> set cdoSchema=http://schemas.microsoft.com/cdo/configuration
> echo >>%vbsfile% Set objArgs = WScript.Arguments
(snip)
> echo >>%vbsfile% objEmail.Send

Well done! Works for me, too. One small, but necessary correction, at
least on my XP PC. The :creatVBS subroutine must be concluded with

goto :EOF

foxidrive

unread,
Jul 10, 2012, 11:40:52 AM7/10/12
to
On Wednesday 11/07/2012 00:43, Timo Salmi wrote:
> On 10.07.2012 09:52 foxidrive wrote:
>> I had this saved - just tested it in Win 7 and it works.
>> ::bat-email.cmd:::::::::::::::::::::::::::::::::::::::::::::::::::::
>> @echo off
>> setlocal
>> set vbsfile=bat-email.vbs
>> call :createVBS
> (snip)
>> :createVBS
>> del %vbsfile% 2>nul
>> set cdoSchema=http://schemas.microsoft.com/cdo/configuration
>> echo >>%vbsfile% Set objArgs = WScript.Arguments
> (snip)
>> echo >>%vbsfile% objEmail.Send
>
> Well done! Works for me, too. One small, but necessary correction, at
> least on my XP PC. The :creatVBS subroutine must be concluded with
>
> goto :EOF

Is that right at the end of the file? The end of the file is an implied GOTO :EOF but it won't hurt if you add it.
Did you see some odd behaviour?



I added the del "%vbsfile%" below otherwise it leaves the VBS script laying around.

call :send %From% %To% %Subj% %Body% %Serv% %Auth% %Pass%
pause
del "%vbsfile%"
goto :EOF



--
Mic


Timo Salmi

unread,
Jul 10, 2012, 12:20:30 PM7/10/12
to
On 10.07.2012 18:40 foxidrive wrote:
> On Wednesday 11/07/2012 00:43, Timo Salmi wrote:
>>> echo >>%vbsfile% objEmail.Send
>> Well done! Works for me, too. One small, but necessary correction, at
>> least on my XP PC. The :creatVBS subroutine must be concluded with
>>
>> goto :EOF
>
> Is that right at the end of the file? The end of the file is an implied GOTO :EOF but it won't hurt if you add it.
> Did you see some odd behaviour?

Yes, I actually did. The VBS script did not come out complete. The XP
script failed to take the implied :EOF as an implied end of the
subroutine. It hung.

> I added the del "%vbsfile%" below otherwise it leaves the VBS script laying around.

Already noticed that. I am currently writing a more involved, customized
shell for my own private use around the sending method you posted and
some of what I've found on the net. Thanks for the very useful "kernel".

Leon Sharp

unread,
Jul 10, 2012, 1:16:53 PM7/10/12
to
On Monday, July 9, 2012 6:26:29 PM UTC-4, Todd Vargo wrote:
> On 7/9/2012 3:59 PM, Leon Sharp wrote:
> &gt; On Monday, July 9, 2012 12:26:33 AM UTC-4, foxidrive wrote:
> &gt;&gt; On Monday 09/07/2012 08:36, Todd Vargo wrote:
> &gt;&gt;
> &gt;&gt;&gt; BTW, look at the code you posted again. Although OP wanted to COPY the
> &gt;&gt;&gt; file to another location, the original file should be MOVEd or deleted.
> &gt;&gt;
> &gt;&gt; Deleted after FTP I expect.
> &gt;&gt;
> &gt;&gt;&gt; If you do not remove the file from the original location, the loop will
> &gt;&gt;&gt; copy/ftp the same file indefinitely, not only wasting cpu time, but
> &gt;&gt;&gt; internet bandwidth as well.
> &gt;&gt;
> &gt;&gt; Good point and well spotted. :)
> &gt;&gt;
> &gt;&gt;
> &gt;&gt;
> &gt;&gt; --
> &gt;&gt; Mic
> &gt;
> &gt; Did I say copy... of course I meant move!! ;) testing now... i&#39;ll get back at ya.
>
> Better stick with adding the delete after ftp. Otherwise, if you replace
> COPY with MOVE, you will either have to move it after the ftp or make
> several other modifications for the ftp to work.
>
> --
> Todd Vargo
> (Post questions to group only. Remove &quot;z&quot; to email personal messages)

Yup, I kept the copy for now and added the delete after the FTP, so far its working okay. I just need to add some error checking for the email portion and probably add date and time to end of file as well.

JJ

unread,
Jul 11, 2012, 1:19:55 AM7/11/12
to
foxidrive <foxi...@gotcha.woohoo.invalid> wrote:

> Win 7 doesn't have OE any longer.
>
> I had this saved - just tested it in Win 7 and it works.

Nice.
That schema URL is just a configuration right?
It won't actually phone home, I presume.

JJ

unread,
Jul 11, 2012, 1:21:45 AM7/11/12
to
foxidrive <foxi...@gotcha.woohoo.invalid> wrote:

> Win 7 doesn't have OE any longer.

I'm an XP die hard. \(O,o)_

foxidrive

unread,
Jul 11, 2012, 3:30:50 AM7/11/12
to
Yet it works in Win 7 and would suggest that some other mechanism other than OE is involved.



--
Mic


Todd Vargo

unread,
Jul 11, 2012, 4:09:31 PM7/11/12
to
Just goes to show how sloppy Microsoft engineers really are. They omit
the app from the OS but leave its underlying APIs available for malware
exploits and phone home abilities.

--
Todd Vargo

JJ

unread,
Jul 12, 2012, 12:37:25 AM7/12/12
to
Todd Vargo <tlv...@sbcglobal.netz> wrote:

> Just goes to show how sloppy Microsoft engineers really are.
> They omit the app from the OS but leave its underlying APIs
> available for malware exploits and phone home abilities.

I was curious, so I checked Win7. It's still the same - both x86
and x64.

CDOSYS.DLL > INETCOMM.DLL > MSOERT2.DLL

And they say it's more secure. -_-

The only difference is just the branding of MSOERT2.DLL.
WinXP: Microsoft Outlook Express RT Lib
Win7 : Microsoft Windows Mail RT Lib

FYI...

CDOSYS.DLL:
Microsoft CDO for Windows Library
(yeah, very descriptive...)
CDO stands for Collaboration Data Objects. Was OLE Messaging, then
Active Messaging.

INETCOMM.DLL:
Microsoft Internet Messaging API

JJ

unread,
Jul 12, 2012, 12:38:34 AM7/12/12
to
foxidrive <foxi...@gotcha.woohoo.invalid> wrote:

> Yet it works in Win 7 and would suggest that some other
> mechanism other than OE is involved.

Is there any risk for mail sending?

foxidrive

unread,
Jul 12, 2012, 1:57:32 AM7/12/12
to
I don't see any. I doubt Microsoft is sending themselves a copy to check on what I am doing.



--
Mic


Timo Salmi

unread,
Jul 12, 2012, 7:03:32 AM7/12/12
to
On 12.07.2012 07:37 JJ <jaejunks_at@_googlemail_dot._com> wrote:
> CDOSYS.DLL > INETCOMM.DLL > MSOERT2.DLL

I am stuck with my laptop XP SP3 (with IE8) about

Set objEmail = CreateObject("CDO.Message")
producing for the above foxidrive's earlier line:
A dynamic link library (DLL) initialization routine failed.

I don't have the same problem on my desktops. The probable cause is that
on my Laptop the OE is completely broken while on the desktops it is ok.
Now I should obviously reinstall OE on the laptop, but I have no idea
how. It no more comes with IE8 nor is it a separately installable utility.

I have also copied to the laptop C:\WINDOWS\System32\ the files
cdosys.dll inetcomm.dll msoert2.dll from the destops and tried to
regsvr32 them, but I get the a similar DLL errors.

Now what has this to do with batch? The same thing as before. Getting
the command-line batch solution to send the email.

foxidrive

unread,
Jul 12, 2012, 9:10:41 AM7/12/12
to
On Thursday 12/07/2012 21:03, Timo Salmi wrote:
> On 12.07.2012 07:37 JJ <jaejunks_at@_googlemail_dot._com> wrote:
>> CDOSYS.DLL > INETCOMM.DLL > MSOERT2.DLL
>
> I am stuck with my laptop XP SP3 (with IE8) about
>
> Set objEmail = CreateObject("CDO.Message")
> producing for the above foxidrive's earlier line:
> A dynamic link library (DLL) initialization routine failed.
>
> I don't have the same problem on my desktops. The probable cause is that
> on my Laptop the OE is completely broken while on the desktops it is ok.
> Now I should obviously reinstall OE on the laptop, but I have no idea
> how. It no more comes with IE8 nor is it a separately installable utility.
>
> I have also copied to the laptop C:\WINDOWS\System32\ the files
> cdosys.dll inetcomm.dll msoert2.dll from the destops and tried to
> regsvr32 them, but I get the a similar DLL errors.
>
> Now what has this to do with batch? The same thing as before. Getting
> the command-line batch solution to send the email.
>
> All the best, Timo
>

In control panel applet "add-remove programs" select "add\remove windows components" and then select and remove OE, and finally re-add it. Good luck.

--
Mic


Timo Salmi

unread,
Jul 12, 2012, 10:52:11 AM7/12/12
to
On 12.07.2012 16:10 foxidrive wrote:
> On Thursday 12/07/2012 21:03, Timo Salmi wrote:
>> Now I should obviously reinstall OE on the laptop, but I have no
>> idea how. It no more comes with IE8 nor is it a separately
>> installable utility.

> In control panel applet "add-remove programs" select "add\remove
> windows components" and then select and remove OE, and finally re-add
> it. Good luck.

No, no. Now that is exactly what I can not do. Else I would not have had
to ask. What I have here is not a beginner's nor even a mediocre user's
standard problem. The broken OE on the laptop is not on the add/remove
list. Furthermore, I do not have nor know where one can obtain an
installation setup package for OE. Or w