How to copy the contents of an FTP directory to a shared network path?

北战南征 提交于 2019-12-22 09:32:58

问题


I have the need to copy the entire contents of a directory on a FTP location onto a shared networked location. FTP Task has you specify the exact file name (not a directory) and File System Task does not allow accessing a FTP location.

EDIT: I ended up writing a script task.


回答1:


I've had some similar issues with the FTP task before. In my case, the file names changed based on the date and some other criteria. I ended up using a Script Task to perform the FTP operation.

It looks like this is what you ended up doing as well. I'd be curious if anyone else can come up with a better way to use the FTP task. It's nice to have...but VERY limited.




回答2:


Nothing like reviving a really old thread... but there is a solution to this.

To copy the all files from a directory then specify your remote path to be /[directory name]/*

Or for just files and not directories /[directory name]/.

Or specific file types; /[directory name]/*.csv




回答3:


When I need to do this sort of thing I use a batch file to call FTP on the command line and use the mget command. Then I call the batch from the DTS/DTSX package.



来源:https://stackoverflow.com/questions/42171/how-to-copy-the-contents-of-an-ftp-directory-to-a-shared-network-path

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!