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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'Error opening script file' using an FTP command in query analyzer

Status
Not open for further replies.

ladyinmt

IS-IT--Management
Jul 30, 2003
1
US
Hi All,
My programmers have asked for my help in troubleshooting an ftp issue we're having when calling an FTP command from a DTS but I'm stumped.

I'm not a programmer myself so hopefully I provide you with enough info. Basically, we have a DTS that runs nightly - goes out to a client FTP site, downloads some files and imports them into the database. For some reason, it just stopped working.

We're running the ftp command with the -s switch which allows us to call an ftp script from a text file. Here is the code that should do this:

DECLARE @bcpCommand varchar(2000) SET @bcpCommand = 'ftp -s:K:\clients\husa\data\dev\cargo\ftp_get.txt' EXEC master..xp_cmdshell @bcpCommand

The error I get is the following:
Error opening script file K:\clients\husa\data\dev\cargo\ftp_get.txt.

If I open a command prompt, and type the part that appears to be failing:
ftp -s:K:\clients\husa\data\dev\cargo\ftp_get.txt

Thre are no problems opening/executing the FTP script and it goes out and does everything it's supposed to.

It seems like it could be permission related so I've attempted to copy the ftp script locally and call to the local file but I have the exact same results. Please let me know if you have any further questions and thanks in advance for your help!

Heather Masterson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top