Focal Point
Running .bat files from WebFOCUS .fex files

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5691038331

March 08, 2005, 12:04 PM
RCourtemanche
Running .bat files from WebFOCUS .fex files
I know PC FOCUS and WebFOCUS .fex programs can handle certain DOS commands, but I'm wondering if WebFOCUS can launch a .bat file that runs a .ftp file to FTP a file to a remote FTP site. The .bat file commands look like this: "ftp -n -sBig Grin_LEHMAN.ftp" where D_LEHMAN.ftp is the name of the file with the FTP commands in it. The .ftp file has the following language in it:

open ftp.Sitename.com
user username password
lcd C:\filename\
cd ftpdirectory/download
prompt off
mget *20030528*.html
quit

Any thoughts/techniques would be much appreciated?
March 08, 2005, 12:14 PM
<WFUser>
What's wrong with !drive:\\dir\filename.bat ? If you need to dynamically change the file names and/or directories then create the bat file using -WRITE.
March 08, 2005, 01:45 PM
<Pietro De Santis>
DOS c:\temp\test.bat
March 08, 2005, 04:25 PM
susannah
CMD c:\temp\test.bat
at my site CMD works in some places that DOS doesn't.
But for my ftp pull, i write a chunk of code dynamically with -WRITE statements (just like your code..my first statement is an open statement)
to a file that is filedeffed within my agent.
and then to run it, the command is
DOS ftp -i -s:GET.FTP
where GET.FTP is the file i've made.
I credit Duncan at Westcon for teaching me this.
works like a charm.