DTS + files

  • Hey i have a DTS that uses a FTP to pic up files... but my problem is that my DTS is looking for a file it keeps failing, i've created a blank file of 0KB but every time i look at this file after it has been cpoied it becomes 1kb would this cause the DTS to fail ?

    Any help would be great thanks

  • My guess would be that you have the file not in the root folder of the FTP site.  My experience has shown that the FTP funciton built into DTS is rather simplistic.  If you put the file in the root folder of the FTP site it should be able to fetch it for you.

  • We have the same problem , what we use to do is to run a command like using the stored procedure

    EXEC master..xp_cmdshell

    calling the http://FTP.exe program.

    we made a text document with all the command and we pass it to the http://ftp.exe

    like this : 

    EXEC master..xp_cmdshell "ftp -s:c:\temp\ftpcmd.txt"

     

    where ftpcmd.txt is kind like :

    OPEN http://ftp.anyserver.com

    user1

    pwd1

    get *.xls

    i hope this help.

    Pedro R. Lopez
    http://madurosfritos.blogspot.com/[/url]

  • Sorry i think i put you guys off track with the FTP link i've no problem with it,

    I have a DTS, which is a file with or without data collected from a FTP site the goes into the database.

    The data transform between the file and the DB connection, i.e the source and destination is a link to the file..

    this is were the problem is.. it keeps failing even though i have a empty file of 0kb inthe location..

  • make different sources and destinations.

  • I have found the problem, when i collaborate all the files that are on the FTP site into one file it adds a funny character into the file , same thing happens when i copy a blank file from one place to another....

    this is what am using in my batch file to collaborate  all the file, is there a append command that i could use in my batch file, or a copy comment that just copies a  0KB file but does not add in the funny char which makes the file 1KB in size..

    copy E:\temp\Fi*.txt = E:\temp\Coll.txt

  • Funny thing you are right , never notice this.

    use this

    copy E:\temp\Fi*.txt = E:\temp\Coll.txt /B

    i would work.

    Pedro R. Lopez
    http://madurosfritos.blogspot.com/[/url]

  • Thanks but what does the /B do ?

    copy E:\temp\Fi*.txt = E:\temp\Coll.txt /B

     

     

  • copy /?

     

    /B binary files.

    Pedro R. Lopez
    http://madurosfritos.blogspot.com/[/url]

  • thanks for your help, this now works like clockwise... cheers...

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply