Getting files from a directory in a server
Can someone help me with moving files from a server to another server. Ive tried using the FOREACH loop container, but it seems that the files have to be on the same server to use a flat file enumerator. My issues is I have Server A, and Server B. I need to pull files from a folder in A onto B, B has SSIS on it. I tried creating a connection manager to the existing folder on A, but I cant seem to use it in the FOREACH container. Suggestions? Thanks You are so wise...like a miniature budha covered in fur. -Anchorman
October 19th, 2010 9:33pm

Hello Reza Mohamed, Do a small simple test and see if you are providing the correct path for Destination directory. 1--Create a package, Drag File system task 2--Make connect to your any Test file on server A and then in provide the Destination path (ServerB directory). Run this and see if it works. If it works then you can use follow the giving example , make changes as this post is about copying files from one directory to another, in your case it will be move. so in File System Task , operation will be Move File. http://www.rafael-salas.com/2007/03/ssis-file-system-task-move-and-rename.html Please provide Error message to get better help. thanks
Free Windows Admin Tool Kit Click here and download it now
October 19th, 2010 9:45pm

and be sure that you dont map it to network drive like z:\ (Because network drives are session specific and not available when session ends)BI and ERP Senior Consultant @ Nexum Bogazici If it is, Please dont forget to mark as answered or at least vote as helpful if the post helps you in any ways.
October 19th, 2010 9:58pm

the issue is, the directory is in a connection manager connection because it is in a different server (server A) as opposed to where the SSIS package is stored and running (Server B). I am trying to figure out how to use this connection in the foreach loop. When using the FOREACH file enumerator, it only browses across the local server (server B). You are so wise...like a miniature budha covered in fur. -Anchorman
Free Windows Admin Tool Kit Click here and download it now
October 19th, 2010 10:26pm

If you have the rights to write to server B then use a Script task instead.Arthur My Blog
October 19th, 2010 10:29pm

To Extract or Write files , you don't need to have SSIS on that server. How you are providing the directory path. Make sure you are providing correct directory path. Save the directory path in Variable and use Directory Path as Variable. As i suggested you do a simple sample and see if it works for you , then you proceed with Foreach loop. provide the destination directory in this format \\SERVERNAME\DriveNAME$\FOLDERNAME e.g \\MYAPPSERVER\D$\MYDESTINATIONFOLDER Save this in a variable and in File system task ,use this variable as DestinationVariable and Set ISDestinationPathisVariable To True. Thanks
Free Windows Admin Tool Kit Click here and download it now
October 19th, 2010 10:32pm

would you please share your folder path that you use in your connection editor? (Remove the sensitive information please) I think It must be a shared network path. If it is \\SOMESERVER\c$\somefolder\ then please verify that you dont use c$ and you have enabled sharing on \\SOMESERVER\somefolder and you can view it by Windows Explorer. BI and ERP Senior Consultant @ Nexum Bogazici If it is, Please dont forget to mark as answered or at least vote as helpful if the post helps you in any ways.
October 19th, 2010 10:51pm

the issue is, the directory is in a connection manager connection because it is in a different server (server A) as opposed to where the SSIS package is stored and running (Server B). I am trying to figure out how to use this connection in the foreach loop. When using the FOREACH file enumerator, it only browses across the local server (server B). You are so wise...like a miniature budha covered in fur. -Anchorman Hi Reza, Your concern is how do we browser a network path in the "Foreach Loop Editor" > "Foreach File Enumerator" right? In order to browser a network shared folder, we can type the network path in the "Folder:" textbox directly. e.g. \\servername\SharedFolderName Thanks, Jin ChenJin Chen - MSFT
Free Windows Admin Tool Kit Click here and download it now
October 21st, 2010 5:46am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics