• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 482
  • Last Modified:

DTS to ftp files from server to local computer using CuteFTP

Hi Experts,

I've been asked to develop a DTS which will pull files from an ftp server and place them on a local computer using CuteFTP.
I'll then need to check for and log errors to a txt file which will be sent by email.  

I'm new to DTS and unsure how to get the FTP side of this to work.  Any idea?

Cheers,
Sarah
0
sarahth
Asked:
sarahth
  • 4
  • 3
2 Solutions
 
obahatCommented:
I don't think that could do it with DTS.
The way that DTS works, is that you define a DTS (Data Transformation Service) package, and it transfers objects from one ODBC data source to the other. You can transfer fixed files (i.e., file name is fixed in each DTS package, since a single file can be an ODBC source), but if you want to move several files (which is probably what you need) you could not use DTS package. Also - building DTS packages cannot be done programatically in T-SQL (and I don't think it can be done otherwise, programateically, that is).

The good new are:
The DTS is based on SQL-DMO object (Data Manipulation Objects).
This is how SQL-Server GUIs build and execute the DTS package.
Please refer to SQL DMO for a complete list of available objects and methods

Some good links here would be
http://www.sqlteam.com/item.asp?ItemID=9093
http://sqldev.net/sqldmo/SQL-DMO-FAQ.htm
http://support.microsoft.com/?kbid=326613

and there are MANY MANY others.

Hope this helps.

Omri.
0
 
sarahthAuthor Commented:
Someone suggested I use a Dynamic Properties task to set variables which would then be used by a VB script which would invoke the FTP procedure; connecting to the site, downloading the files and then logging errors if they occur.

Can this be done?
0
 
nmcdermaidCommented:
Does CuteFTP work with the command line?

Then you could use an Executre Process task to run it.

Failing that I know the standard windows FTP works with the command line. Also there is an actual FTP task in DTS that you can use.


If you wanted to just copy several files you could use ActiveX or Execute SQL tasks in DTS.


0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
sarahthAuthor Commented:
I'll be using CuteFTP Pro which can be run from the command line and is scriptable.  Unfortunetly I have to use this program because the process will involve the exchange of digitial certificates.

Do you know of any web sites or have any example scripts that will execute the ftp program and retrieve the files?

Thanks
Sarah
0
 
nmcdermaidCommented:
This site

http://www.alamopc.org/pcalamode/reviews/archive2/rev129901.html

says that you can write a macro within CuteFTP that can be run from the command line.

Sorry I don't have any examples but surely CuteFTP help would have examples of using it from the command line?

If not, usually you can just open a dos box, go to the install path, search for a likely EXE file and run it with a /? switch. In most cases that will give you help.


So you need to build your command line string from there, then just pop it into a DTS Execute Process Task.

If you need to do a couple of things, pop your command lines into a .CMD file, and run that file from the command line.


If you have to do any funky dynamic parameters into FTP, you can build a CMD file on the fly and then run that.


0
 
sarahthAuthor Commented:
Thanks for all the suggestions - the sites recommended were quite helpful so I think I'll be able to work this one out :)

I found this whilst searching for scripts

http://www.globalscape.com/files/PR6TE_usersGuide.pdf

Makes interesting reading.

I'll split the points between nmcdermaid and obahat.  Thanks for your help guys.

Sarah
0
 
sarahthAuthor Commented:
Sorry, I think I just awarded to nmcdermaid - I'll get these split asap
0

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now