Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

First question - set ftp xfermode ASCII

Status
Not open for further replies.

Newmikeyd

Programmer
Jul 20, 2004
2
US
Hi,

My first post.

I have an ASPECT script that moves files from an AIX box to my PC. It works fine.

The files are xferred in Binary, but I'd like Ascii. I tried adding 'set ftp xfermode ASCII' & the script compiles ok, but the files continue to come over as binary.

If I change the default Transfer Mode for the directory entry, it works fine.

Any ideas what could be wrong?

Thanks
 
This method works.

Proc Main

#include "pw4menu.inc"

set ftp filter local ""
set ftp filter remote ""
ftp local chdir "c:\program files\procomm plus\backup\"

Menuselect PWMENU 18120 ;see pwmenu.ini file in the aspect directory, this selects Ascii on the toolbar

pause 5

ftp remote copyfile "ASCII filename" ;copy file from the remote ftp site

while $ftpstatus ;Yeild while transferring

yield

endwhile

PAUSE 4

Menuselect PWMENU 18119 ;see pwmenu.ini file in the aspect directory this selects Binary on the toolbar

pause 2

ftp remote copyfile "Binary file name" ;copy file from the remote ftp site

while $ftpstatus ;Yeild while transferring

yield

endwhile

hangup

endproc
 
What is likely happening is that the set command is before the connection attempt in your script. When the connection is made via your script, the settings in the Connection Directory will override the setting your script had previously specified.


aspect@aspectscripting.com
 
Thanks for the help. The suggestion to use the pwmenu approach worked.

Re: suggestion #2, the SET command was after the connection was made. Still don't understand why this didn't work.

Thanks!
 
It looks like the set command only affects the setting within Procomm's Setup dialog and not the current connection, which is very odd in my opinion.


aspect@aspectscripting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top