FTP Get and Put file operation with ini File
Moderators: JRL, Dorian (MJT support)
FTP Get and Put file operation with ini File
Can I use a ini file to designate the peramiters for the ftpgetfile and the ftpputfile operations.
Al Sheffer
FTP Get and Put file operation with ini File
I thought you could but I just cant seem to get the syntax write.
Thanks
Thanks
Al Sheffer
The below line is stolen from MScheds onlinehelp,
So your code would look like this:
And the assigned INIFile Upload.ini should contain this:
[Upload]
Server=ftp.domain.com
Username=anonymous
Password=[email protected]
Port=21
Local=c:\temp\
Host=/pub/
Mode=A
BTW: It's nearly the same with GET
Code: Select all
FTPPutFile>ftp.domain.com,anonymous,[email protected],21,c:\temp\readme.txt,/pub/readme.txt,A
Code: Select all
Let>File=readme.txt
Let>inifile=C:\Temp\Upload.ini
Let>section=Upload
ReadIniFile>inifile,section,Server,Server
ReadIniFile>inifile,section,Username,Username
ReadIniFile>inifile,section,Password,Password
ReadIniFile>inifile,section,Port,Port
ReadIniFile>inifile,section,Local,Local
ReadIniFile>inifile,section,Host,Host
ReadIniFile>inifile,section,Mode,Mode
Label>CheckForFile
Change Directory>%Local%
IfFileExist>%File%,Upload
Wait>3
Goto>CheckForFile
Label>Upload
ConCat>Local,%File%
ConCat>Host,%File%
FTPPutFile>Server,Username,Password,port,Local,Host,Mode
And the assigned INIFile Upload.ini should contain this:
[Upload]
Server=ftp.domain.com
Username=anonymous
Password=[email protected]
Port=21
Local=c:\temp\
Host=/pub/
Mode=A
BTW: It's nearly the same with GET

FTP Get and Put file operation with ini File
Thank you for the info
Everything worked except I cant get the file to post to a subdirectory it only posts the file to the root folder. I have checked the name and it is right. The local is working fine the Host is not.
Do you have any ideas?
Thanks
Everything worked except I cant get the file to post to a subdirectory it only posts the file to the root folder. I have checked the name and it is right. The local is working fine the Host is not.
Do you have any ideas?
Thanks
Al Sheffer
Have a try with doing it manualy to check if it's necessary to have a leading slash in the path. It's possible that the filesystem is configured differently, based on the OS which is used on the Server (I assume in the sample it's a UNIX Box (slash not backslash)).
If it's not that easy send a mail to MSched support.
If it's not that easy send a mail to MSched support.