August 28, 2004 at 1:19 am
I have an Execute Process Task in a DTS that executes a
batch file. This batch file is designed to pull a text file from an ftp site.
The batch file works when I test it, by executing it from Windows Explorer
and drops the ftp'd text file into the same folder with the batch file.
When I run my DTS and the Execute Process Task runs, it appears
that the batch file executes, but the ftp'd text file is not where I expected it (in the folder with the batch file). Can anyone please tell me what's going on here? Where is the text file going?
Thanks.
August 30, 2004 at 8:47 am
James,
Does the text file get generated anywhere on the server? Can you find the file?
September 2, 2004 at 9:37 pm
I've looked for the file on the server and can't locate it. I tried beginning my batch file with CHDIR in an attempt to have the ftp'd file dropped in the network location I'd like. That didn't work. ![]()
My goal is to place the file in a specific network location where the DTS can continue processing it. When I test the DTS from my PC, the file is placed at C:\MSSQL7\BINN When I run it as a scheduled job, I don't know where the file is being generated, but I do see the batch file execute.
September 3, 2004 at 8:43 am
it is defaulting to the current active directory. This is the script we use to transfer files from DTS. We use a LCD for the local machine with a hardcoded directory.
cd "exportdir"
lcd "k:\inetpub\ftproot\travel\data\prefhotel\working"
mget inputfile1*.txt
mdelete inputfile1*.txt
September 5, 2004 at 6:50 pm
when you execute a DTS package from your workstation, the command is executed in reference to your workstation, so the lcd command will get the file from the FTP site to your K:\.... drive. When you schedule the DTS package to run, it is ran at the Server in the security context of the SQL Agent, and there is probably not a K:\... location. why don't you change the lcd command to a UNC and see if it works.
September 8, 2004 at 4:37 am
The file will be located in the C:\Program Files...SQL Server\binn directory. That is where the DTS files are located.
Have you tried using the DTS FTP task?
--------------------
Colt 45 - the original point and click interface ![]()
Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply