Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, November 25, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - Legacy Development
Forum to discuss SalesLogix legacy development including views, scripts, etc.. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Legacy Development | New ThreadView:  Search:  
 Author  Thread: Uploading Files to an FTP site with code
Leon Gort
Posts: 127
 
Uploading Files to an FTP site with codeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Dec 07 7:33 PM
I am hoping to be able to upload files to an FTP site in legacy script. I was trying to use the code found here(http://www.scriptcode.co.uk/ftp_connect_and_upload.htm) as an example but unfortunately cannot get it to work. If someone could point me in the right direction it would be most appreciated.
[Reply][Quote]
Ian Fitzpatrick
Posts: 146
 
Re: Uploading Files to an FTP site with codeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Dec 07 9:16 PM
I use a .bat file to upload files to an FTP server in Legacy.

"open servername
username
password
cd ..
lcd C:\directory of the outgoing file
ascii
cd /place to put the file
put C:\file to move
quit"

and I call the .bat file using SQL DTS, but I'm excited to use this more modern method in v7.0.
[Reply][Quote]
Leon Gort
Posts: 127
 
Re: Uploading Files to an FTP site with codeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Dec 07 9:24 PM
Thx Ian. I actually just found a dll I purchased which is an activeX component that seems to work well. (http://www.chilkatsoft.com/) Most of my users are Terminal server users so I don't have to register the component on too many PC's. I also can check for failed uploads etc.
[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Uploading Files to an FTP site with codeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Dec 07 4:15 AM
This uses the embedded ftp client within IE/Windows Explorer:

strFTP = "ftp://" & FTPUser & ":" & FTPPass & "@" & FTPHost & FTPDir
Set objFTP = oShell.NameSpace(strFTP)

This may/may not work depending on your OS/Version of IE.

What is that yuo are trying to do ? It would most likely be easiest to create a command file (e.g ftp.cmd) and then pass it details via "ftp -v -i -s:file.txt" - you can then pass this out to shell to run.
[Reply][Quote]
Walter Shpuntoff
Posts: 167
 
Re: Uploading Files to an FTP site with codeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Dec 07 8:32 AM
The thing you have to watch for is timing... i.e. are you doing a blind toss of the file on to the server, or are you doing something based on when it completes. The activex may get you that, and on a single site deployment seams a decent way to go.

If timing is an issue and you are using the CMD file approach, then you have to do a lock file and monitor it so you will know that the transfer is complete.

ws
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Uploading Files to an FTP site with codeYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Dec 07 10:05 AM
If it has to be done from the SLX client, I would definitely go the route of just making an easy job of it and using a commercial component and use it from a .NET Extension (if you're on 7.x or higher) or as an outside exe to kick off (if on prior versions).

If it doesn't necessarily need to be done via the client and can be done from the SLX server as a job, then SSIS/DTS has built in capabilities to send files off to other servers with little effort.

-Ryan
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/25/2024 9:18:18 AM