Transfer Engine (SDK)
DECLARE @hr int
DECLARE @src varchar(255), @desc varchar(255)
PRINT start
EXEC @hr = sp_OACreate CuteFTPPro.TEConnection , @object
OUT
EXEC @hr = sp_OASetProperty @object, Host ,
ft .
p mysite.com
EXEC @hr = sp_OAGetProperty @object, Host , @property OUT
PRINT @property
EXEC @hr = sp_OAGetProperty @object, Login , @property
OUT
PRINT @property
EXEC @hr = sp_OAGetProperty @object, Prot c
o ol , @property
OUT
PRINT @property
EXEC @hr = sp_OAMethod @object, Connect
EXEC @hr = sp_OAMethod @object, download , NULL, /pub ,
"e:/eee"
EXEC @hr =
sp_OAGetProperty @object, Log , @property OUT
PRINT @property
EXEC @hr = sp_OADestroy @object
PRINT finish
Configuration Notes
SQL can o
n t use an already running instance of ftpte exe. The CuteFTP GUI cannot
communicate with an ftpte instance created by SQL.
When a scheduled task runs as user X while user X is logged in, the profile path will be
set to that user s directory (C:\Documents and Settings\X\). However, when a
scheduled task runs as user X while user X is *not* logged in, the profile path will be
set to the default user directory (C:\Documents and Settings\Default User\).
Therefore, the desired SSL certificates from C:\Documents and
Settings\X\Application Data\GlobalSCAPE\CuteFTP Professional\certs.crt shoul
d
be copied to C:\Documents and Settings\Default User\Application
Data\GlobalSCAPE\CuteFTP Pro e
f ssional\certs.crt
If you use UseProxy, be sure to specify any pr x
o y information. Please see Connecting
through a SOCKS or Proxy Server for more information.
Tips
Add a couple of log lines so that it can write to the log whenever something happens
successfully. Add it after the connect line, so that you can see how far i t gets.
To make sure you are connecting long enough to get data, use the GetList method to
write a list to a local file.
233
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved