Huge Problem, Please Help

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
munsworth

Huge Problem, Please Help

Post by munsworth » Tue Jul 29, 2003 9:23 pm

I have a VB Program that creates a .bat file and a script file. It then shells
this bat file. The purpose of the bat file is to download xml documents
from a remote server. The executable runs fine on its own, but won't run
when called from MacroSheduler. The .bat and .ftp (script) files are
created and the .bat file seems to be executing, but nothing is
downloaded from the ftp server. Below is the code in all of the files. I
removed specifics for security reasons.

This works fine when not used through MacroScheduler. Has anyone else
had a problem like this?

Code: Select all

>send.bat
        @echo off
        \\server\share
        ftp -i -s:send.ftp - xxxxxxxxxx.xxx.xxx.com <--Proxy Server
        @cls

>send.ftp
        username   <--proxy user
        password    <--proxy pwd
        user [email protected] ftppassword
        cd /-----/--/--/     <--drop folder
        mget *.xml  
        mget *.XML
        mdelete *.xml  
        mdelete *.XML
        quit

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Jul 30, 2003 12:27 am

Please show the Macro Scheduler code that does not work

munsworth

Post by munsworth » Wed Jul 30, 2003 1:50 pm

Thats the thing the only code I use in MacroScheduler is:

Code: Select all

let>RP_WAIT=1
let>RP_WINDOWMODE=0
run>C:\getXML.exe
The program executes and creates the correct files and shells the .bat file,
but the bat file executes unusually fast and doesn't get any of the XML
files. If I manualy run getXML.exe everything runs fine.

Lumumba

Post by Lumumba » Wed Jul 30, 2003 3:32 pm

>"but the bat file executes unusually fast ..."

that sounds like:
the dos box opens, an error occured, the dos box closes.
That's click&gone.

If that's the case run the batch from "within" a shell:

Code: Select all

Run Program>cmd /k C:\send.bat
/k will prevent the box to be closed (/c is the revers parameter)
Therefore you'll have the chance to get an error message if one has occured.

cmd=W2K/NT/XP
command=W9x/ME

---

BTW: why using a batch? (you've to insert the missing details)

Code: Select all

Let>user=
Let>username=
Let>password=
Let>ftppassword=
Let>dropfolder=
Let>fileext=XML
Let>IP=xx.xxx.xxx.xxx
Let>Proxy=xxxxxxxxxx.xxx.xxx.com

WLN>C:\send.ftp,Result,%username%%CRLF%%password%%CRLF%
        %user% ftpuser@%IP% %ftppassword%%CRLF%cd %dropfolder%%CRLF%mget *.%fileext%%CRLF%mget *.%fileext%%CRLF%mdelete *.%fileext%%CRLF%mdelete *.%fileext%%CRLF%quit

Let>RP_WAIT=1
Let>RP_WINDOWMODE=0
Run Program>cmd /c ftp -i -s:send.ftp - %Proxy%
Del>C:\send.ftp

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts