dbTalk Databases Forums  

FTP Task and Importing Zipped files

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss FTP Task and Importing Zipped files in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jason
 
Posts: n/a

Default FTP Task and Importing Zipped files - 04-16-2008 , 09:45 PM






Hello, I need to import zipped text files from an ftp site. Can someone
please tell me how to go about doing this?

I tried the ftp task, but was unable to connect to the server. There is no
login needed to connect, and I am able to access the site just fine without
supplying login info. I do have "anonymous" in the user name.

Also, once I am able to copy over the zipped files, how can I extract them
in bulk?

Thanks for your help!

Jason

Reply With Quote
  #2  
Old   
Charles Wang[MSFT]
 
Posts: n/a

Default RE: FTP Task and Importing Zipped files - 04-17-2008 , 05:33 AM






Hi Jason,
I understand that you would like to execute your FTP task to upload your
zipped files to your FTP site, however you could not connect to the server.
Also you would like to know how you can extract them in bulk after you
upload the files.
If I have misunderstood, please let me know.

Regarding FTP task, please first ensure that you have assigned Read/Write
permission to Everyone on the folder in your FTP site. After that you can
use anonymous account to connect to it.
Assume that you want to upload the files from your local folder
F:\Materials to the FTP site ftp://myftpserver/Materials. Then you can
refer to the following steps:
1. Create a FTP connection in Connection Managers pane.
Right click the pane, click New Connection..., select FTP and click
Add..., input your FTP server name as "myftpserver", input the server port
if it is not 21, leave user name as anonymous and leave password field
blank, and click Test Connection. This should be ok if you have manually
checked that you can connect to your ftp site anonymously from IE.
2. Drag a FTP task to Data Flow pane, double click it, select the
FtpConnection and give it a new name, the select "File Transfer" in the
left list, select your remote directory path to RemotePath field, select
OverwriteFileAtDest as True, select IsLocalPathVariable as True, click
LocalVariable and select <New Variable...> and input a variable with the
name "FileName", namespace User, value type String and value blank. After
you create the new variable, click OK.
3. Drag a Foreach Loop Container to your Data Flow pane and ensure that FTP
Task is within it, double click the task, give it a new name, then select
Collection at the left pane, select Enumerator as "Foreach File
Enumerator", then select your folder to Folder field, input "*.*" to Files
field, select Retrieve file name as "Fully qualified", then click the
Expression field in the top list, click the button (...), select Name as
the first property and then click the button(...), and drag User::FileName
to Expression field and click OK, then select Variable Mappings in the left
list, select User::FileName in the Variable list to match Index 0.

Regarding your question of extract them in bulk, I am afraid that you may
need to write an application by yourself to do it. Then you can use it in
an Execute Process Task in SSIS package.

Hope this helps. Please feel free to let me know if you have any other
questions or concerns. Have a nice day!



Best regards,
Charles Wang
Microsoft Online Community Support
================================================== =========
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg (AT) microsoft (DOT) com.
================================================== =========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for
non-urgent issues where an initial response from the community
or a Microsoft Support Engineer within 1 business day is acceptable.
Please note that each follow up response may take approximately
2 business days as the support professional working with you may
need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
================================================== ==========
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== =======






Reply With Quote
  #3  
Old   
Charles Wang[MSFT]
 
Posts: n/a

Default RE: FTP Task and Importing Zipped files - 04-17-2008 , 05:33 AM



Hi Jason,
I understand that you would like to execute your FTP task to upload your
zipped files to your FTP site, however you could not connect to the server.
Also you would like to know how you can extract them in bulk after you
upload the files.
If I have misunderstood, please let me know.

Regarding FTP task, please first ensure that you have assigned Read/Write
permission to Everyone on the folder in your FTP site. After that you can
use anonymous account to connect to it.
Assume that you want to upload the files from your local folder
F:\Materials to the FTP site ftp://myftpserver/Materials. Then you can
refer to the following steps:
1. Create a FTP connection in Connection Managers pane.
Right click the pane, click New Connection..., select FTP and click
Add..., input your FTP server name as "myftpserver", input the server port
if it is not 21, leave user name as anonymous and leave password field
blank, and click Test Connection. This should be ok if you have manually
checked that you can connect to your ftp site anonymously from IE.
2. Drag a FTP task to Data Flow pane, double click it, select the
FtpConnection and give it a new name, the select "File Transfer" in the
left list, select your remote directory path to RemotePath field, select
OverwriteFileAtDest as True, select IsLocalPathVariable as True, click
LocalVariable and select <New Variable...> and input a variable with the
name "FileName", namespace User, value type String and value blank. After
you create the new variable, click OK.
3. Drag a Foreach Loop Container to your Data Flow pane and ensure that FTP
Task is within it, double click the task, give it a new name, then select
Collection at the left pane, select Enumerator as "Foreach File
Enumerator", then select your folder to Folder field, input "*.*" to Files
field, select Retrieve file name as "Fully qualified", then click the
Expression field in the top list, click the button (...), select Name as
the first property and then click the button(...), and drag User::FileName
to Expression field and click OK, then select Variable Mappings in the left
list, select User::FileName in the Variable list to match Index 0.

Regarding your question of extract them in bulk, I am afraid that you may
need to write an application by yourself to do it. Then you can use it in
an Execute Process Task in SSIS package.

Hope this helps. Please feel free to let me know if you have any other
questions or concerns. Have a nice day!



Best regards,
Charles Wang
Microsoft Online Community Support
================================================== =========
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg (AT) microsoft (DOT) com.
================================================== =========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for
non-urgent issues where an initial response from the community
or a Microsoft Support Engineer within 1 business day is acceptable.
Please note that each follow up response may take approximately
2 business days as the support professional working with you may
need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
================================================== ==========
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== =======






Reply With Quote
  #4  
Old   
Charles Wang[MSFT]
 
Posts: n/a

Default RE: FTP Task and Importing Zipped files - 04-17-2008 , 05:33 AM



Hi Jason,
I understand that you would like to execute your FTP task to upload your
zipped files to your FTP site, however you could not connect to the server.
Also you would like to know how you can extract them in bulk after you
upload the files.
If I have misunderstood, please let me know.

Regarding FTP task, please first ensure that you have assigned Read/Write
permission to Everyone on the folder in your FTP site. After that you can
use anonymous account to connect to it.
Assume that you want to upload the files from your local folder
F:\Materials to the FTP site ftp://myftpserver/Materials. Then you can
refer to the following steps:
1. Create a FTP connection in Connection Managers pane.
Right click the pane, click New Connection..., select FTP and click
Add..., input your FTP server name as "myftpserver", input the server port
if it is not 21, leave user name as anonymous and leave password field
blank, and click Test Connection. This should be ok if you have manually
checked that you can connect to your ftp site anonymously from IE.
2. Drag a FTP task to Data Flow pane, double click it, select the
FtpConnection and give it a new name, the select "File Transfer" in the
left list, select your remote directory path to RemotePath field, select
OverwriteFileAtDest as True, select IsLocalPathVariable as True, click
LocalVariable and select <New Variable...> and input a variable with the
name "FileName", namespace User, value type String and value blank. After
you create the new variable, click OK.
3. Drag a Foreach Loop Container to your Data Flow pane and ensure that FTP
Task is within it, double click the task, give it a new name, then select
Collection at the left pane, select Enumerator as "Foreach File
Enumerator", then select your folder to Folder field, input "*.*" to Files
field, select Retrieve file name as "Fully qualified", then click the
Expression field in the top list, click the button (...), select Name as
the first property and then click the button(...), and drag User::FileName
to Expression field and click OK, then select Variable Mappings in the left
list, select User::FileName in the Variable list to match Index 0.

Regarding your question of extract them in bulk, I am afraid that you may
need to write an application by yourself to do it. Then you can use it in
an Execute Process Task in SSIS package.

Hope this helps. Please feel free to let me know if you have any other
questions or concerns. Have a nice day!



Best regards,
Charles Wang
Microsoft Online Community Support
================================================== =========
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg (AT) microsoft (DOT) com.
================================================== =========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for
non-urgent issues where an initial response from the community
or a Microsoft Support Engineer within 1 business day is acceptable.
Please note that each follow up response may take approximately
2 business days as the support professional working with you may
need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
================================================== ==========
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== =======






Reply With Quote
  #5  
Old   
Charles Wang[MSFT]
 
Posts: n/a

Default RE: FTP Task and Importing Zipped files - 04-17-2008 , 05:33 AM



Hi Jason,
I understand that you would like to execute your FTP task to upload your
zipped files to your FTP site, however you could not connect to the server.
Also you would like to know how you can extract them in bulk after you
upload the files.
If I have misunderstood, please let me know.

Regarding FTP task, please first ensure that you have assigned Read/Write
permission to Everyone on the folder in your FTP site. After that you can
use anonymous account to connect to it.
Assume that you want to upload the files from your local folder
F:\Materials to the FTP site ftp://myftpserver/Materials. Then you can
refer to the following steps:
1. Create a FTP connection in Connection Managers pane.
Right click the pane, click New Connection..., select FTP and click
Add..., input your FTP server name as "myftpserver", input the server port
if it is not 21, leave user name as anonymous and leave password field
blank, and click Test Connection. This should be ok if you have manually
checked that you can connect to your ftp site anonymously from IE.
2. Drag a FTP task to Data Flow pane, double click it, select the
FtpConnection and give it a new name, the select "File Transfer" in the
left list, select your remote directory path to RemotePath field, select
OverwriteFileAtDest as True, select IsLocalPathVariable as True, click
LocalVariable and select <New Variable...> and input a variable with the
name "FileName", namespace User, value type String and value blank. After
you create the new variable, click OK.
3. Drag a Foreach Loop Container to your Data Flow pane and ensure that FTP
Task is within it, double click the task, give it a new name, then select
Collection at the left pane, select Enumerator as "Foreach File
Enumerator", then select your folder to Folder field, input "*.*" to Files
field, select Retrieve file name as "Fully qualified", then click the
Expression field in the top list, click the button (...), select Name as
the first property and then click the button(...), and drag User::FileName
to Expression field and click OK, then select Variable Mappings in the left
list, select User::FileName in the Variable list to match Index 0.

Regarding your question of extract them in bulk, I am afraid that you may
need to write an application by yourself to do it. Then you can use it in
an Execute Process Task in SSIS package.

Hope this helps. Please feel free to let me know if you have any other
questions or concerns. Have a nice day!



Best regards,
Charles Wang
Microsoft Online Community Support
================================================== =========
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg (AT) microsoft (DOT) com.
================================================== =========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for
non-urgent issues where an initial response from the community
or a Microsoft Support Engineer within 1 business day is acceptable.
Please note that each follow up response may take approximately
2 business days as the support professional working with you may
need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
================================================== ==========
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== =======






Reply With Quote
  #6  
Old   
Charles Wang[MSFT]
 
Posts: n/a

Default RE: FTP Task and Importing Zipped files - 04-17-2008 , 05:33 AM



Hi Jason,
I understand that you would like to execute your FTP task to upload your
zipped files to your FTP site, however you could not connect to the server.
Also you would like to know how you can extract them in bulk after you
upload the files.
If I have misunderstood, please let me know.

Regarding FTP task, please first ensure that you have assigned Read/Write
permission to Everyone on the folder in your FTP site. After that you can
use anonymous account to connect to it.
Assume that you want to upload the files from your local folder
F:\Materials to the FTP site ftp://myftpserver/Materials. Then you can
refer to the following steps:
1. Create a FTP connection in Connection Managers pane.
Right click the pane, click New Connection..., select FTP and click
Add..., input your FTP server name as "myftpserver", input the server port
if it is not 21, leave user name as anonymous and leave password field
blank, and click Test Connection. This should be ok if you have manually
checked that you can connect to your ftp site anonymously from IE.
2. Drag a FTP task to Data Flow pane, double click it, select the
FtpConnection and give it a new name, the select "File Transfer" in the
left list, select your remote directory path to RemotePath field, select
OverwriteFileAtDest as True, select IsLocalPathVariable as True, click
LocalVariable and select <New Variable...> and input a variable with the
name "FileName", namespace User, value type String and value blank. After
you create the new variable, click OK.
3. Drag a Foreach Loop Container to your Data Flow pane and ensure that FTP
Task is within it, double click the task, give it a new name, then select
Collection at the left pane, select Enumerator as "Foreach File
Enumerator", then select your folder to Folder field, input "*.*" to Files
field, select Retrieve file name as "Fully qualified", then click the
Expression field in the top list, click the button (...), select Name as
the first property and then click the button(...), and drag User::FileName
to Expression field and click OK, then select Variable Mappings in the left
list, select User::FileName in the Variable list to match Index 0.

Regarding your question of extract them in bulk, I am afraid that you may
need to write an application by yourself to do it. Then you can use it in
an Execute Process Task in SSIS package.

Hope this helps. Please feel free to let me know if you have any other
questions or concerns. Have a nice day!



Best regards,
Charles Wang
Microsoft Online Community Support
================================================== =========
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg (AT) microsoft (DOT) com.
================================================== =========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for
non-urgent issues where an initial response from the community
or a Microsoft Support Engineer within 1 business day is acceptable.
Please note that each follow up response may take approximately
2 business days as the support professional working with you may
need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
================================================== ==========
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== =======






Reply With Quote
  #7  
Old   
Charles Wang[MSFT]
 
Posts: n/a

Default RE: FTP Task and Importing Zipped files - 04-17-2008 , 05:33 AM



Hi Jason,
I understand that you would like to execute your FTP task to upload your
zipped files to your FTP site, however you could not connect to the server.
Also you would like to know how you can extract them in bulk after you
upload the files.
If I have misunderstood, please let me know.

Regarding FTP task, please first ensure that you have assigned Read/Write
permission to Everyone on the folder in your FTP site. After that you can
use anonymous account to connect to it.
Assume that you want to upload the files from your local folder
F:\Materials to the FTP site ftp://myftpserver/Materials. Then you can
refer to the following steps:
1. Create a FTP connection in Connection Managers pane.
Right click the pane, click New Connection..., select FTP and click
Add..., input your FTP server name as "myftpserver", input the server port
if it is not 21, leave user name as anonymous and leave password field
blank, and click Test Connection. This should be ok if you have manually
checked that you can connect to your ftp site anonymously from IE.
2. Drag a FTP task to Data Flow pane, double click it, select the
FtpConnection and give it a new name, the select "File Transfer" in the
left list, select your remote directory path to RemotePath field, select
OverwriteFileAtDest as True, select IsLocalPathVariable as True, click
LocalVariable and select <New Variable...> and input a variable with the
name "FileName", namespace User, value type String and value blank. After
you create the new variable, click OK.
3. Drag a Foreach Loop Container to your Data Flow pane and ensure that FTP
Task is within it, double click the task, give it a new name, then select
Collection at the left pane, select Enumerator as "Foreach File
Enumerator", then select your folder to Folder field, input "*.*" to Files
field, select Retrieve file name as "Fully qualified", then click the
Expression field in the top list, click the button (...), select Name as
the first property and then click the button(...), and drag User::FileName
to Expression field and click OK, then select Variable Mappings in the left
list, select User::FileName in the Variable list to match Index 0.

Regarding your question of extract them in bulk, I am afraid that you may
need to write an application by yourself to do it. Then you can use it in
an Execute Process Task in SSIS package.

Hope this helps. Please feel free to let me know if you have any other
questions or concerns. Have a nice day!



Best regards,
Charles Wang
Microsoft Online Community Support
================================================== =========
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg (AT) microsoft (DOT) com.
================================================== =========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for
non-urgent issues where an initial response from the community
or a Microsoft Support Engineer within 1 business day is acceptable.
Please note that each follow up response may take approximately
2 business days as the support professional working with you may
need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
================================================== ==========
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== =======






Reply With Quote
  #8  
Old   
Charles Wang[MSFT]
 
Posts: n/a

Default RE: FTP Task and Importing Zipped files - 04-17-2008 , 05:33 AM



Hi Jason,
I understand that you would like to execute your FTP task to upload your
zipped files to your FTP site, however you could not connect to the server.
Also you would like to know how you can extract them in bulk after you
upload the files.
If I have misunderstood, please let me know.

Regarding FTP task, please first ensure that you have assigned Read/Write
permission to Everyone on the folder in your FTP site. After that you can
use anonymous account to connect to it.
Assume that you want to upload the files from your local folder
F:\Materials to the FTP site ftp://myftpserver/Materials. Then you can
refer to the following steps:
1. Create a FTP connection in Connection Managers pane.
Right click the pane, click New Connection..., select FTP and click
Add..., input your FTP server name as "myftpserver", input the server port
if it is not 21, leave user name as anonymous and leave password field
blank, and click Test Connection. This should be ok if you have manually
checked that you can connect to your ftp site anonymously from IE.
2. Drag a FTP task to Data Flow pane, double click it, select the
FtpConnection and give it a new name, the select "File Transfer" in the
left list, select your remote directory path to RemotePath field, select
OverwriteFileAtDest as True, select IsLocalPathVariable as True, click
LocalVariable and select <New Variable...> and input a variable with the
name "FileName", namespace User, value type String and value blank. After
you create the new variable, click OK.
3. Drag a Foreach Loop Container to your Data Flow pane and ensure that FTP
Task is within it, double click the task, give it a new name, then select
Collection at the left pane, select Enumerator as "Foreach File
Enumerator", then select your folder to Folder field, input "*.*" to Files
field, select Retrieve file name as "Fully qualified", then click the
Expression field in the top list, click the button (...), select Name as
the first property and then click the button(...), and drag User::FileName
to Expression field and click OK, then select Variable Mappings in the left
list, select User::FileName in the Variable list to match Index 0.

Regarding your question of extract them in bulk, I am afraid that you may
need to write an application by yourself to do it. Then you can use it in
an Execute Process Task in SSIS package.

Hope this helps. Please feel free to let me know if you have any other
questions or concerns. Have a nice day!



Best regards,
Charles Wang
Microsoft Online Community Support
================================================== =========
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg (AT) microsoft (DOT) com.
================================================== =========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for
non-urgent issues where an initial response from the community
or a Microsoft Support Engineer within 1 business day is acceptable.
Please note that each follow up response may take approximately
2 business days as the support professional working with you may
need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
================================================== ==========
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== =======






Reply With Quote
  #9  
Old   
Charles Wang[MSFT]
 
Posts: n/a

Default RE: FTP Task and Importing Zipped files - 04-17-2008 , 05:33 AM



Hi Jason,
I understand that you would like to execute your FTP task to upload your
zipped files to your FTP site, however you could not connect to the server.
Also you would like to know how you can extract them in bulk after you
upload the files.
If I have misunderstood, please let me know.

Regarding FTP task, please first ensure that you have assigned Read/Write
permission to Everyone on the folder in your FTP site. After that you can
use anonymous account to connect to it.
Assume that you want to upload the files from your local folder
F:\Materials to the FTP site ftp://myftpserver/Materials. Then you can
refer to the following steps:
1. Create a FTP connection in Connection Managers pane.
Right click the pane, click New Connection..., select FTP and click
Add..., input your FTP server name as "myftpserver", input the server port
if it is not 21, leave user name as anonymous and leave password field
blank, and click Test Connection. This should be ok if you have manually
checked that you can connect to your ftp site anonymously from IE.
2. Drag a FTP task to Data Flow pane, double click it, select the
FtpConnection and give it a new name, the select "File Transfer" in the
left list, select your remote directory path to RemotePath field, select
OverwriteFileAtDest as True, select IsLocalPathVariable as True, click
LocalVariable and select <New Variable...> and input a variable with the
name "FileName", namespace User, value type String and value blank. After
you create the new variable, click OK.
3. Drag a Foreach Loop Container to your Data Flow pane and ensure that FTP
Task is within it, double click the task, give it a new name, then select
Collection at the left pane, select Enumerator as "Foreach File
Enumerator", then select your folder to Folder field, input "*.*" to Files
field, select Retrieve file name as "Fully qualified", then click the
Expression field in the top list, click the button (...), select Name as
the first property and then click the button(...), and drag User::FileName
to Expression field and click OK, then select Variable Mappings in the left
list, select User::FileName in the Variable list to match Index 0.

Regarding your question of extract them in bulk, I am afraid that you may
need to write an application by yourself to do it. Then you can use it in
an Execute Process Task in SSIS package.

Hope this helps. Please feel free to let me know if you have any other
questions or concerns. Have a nice day!



Best regards,
Charles Wang
Microsoft Online Community Support
================================================== =========
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg (AT) microsoft (DOT) com.
================================================== =========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for
non-urgent issues where an initial response from the community
or a Microsoft Support Engineer within 1 business day is acceptable.
Please note that each follow up response may take approximately
2 business days as the support professional working with you may
need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
================================================== ==========
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== =======






Reply With Quote
  #10  
Old   
Jason
 
Posts: n/a

Default RE: FTP Task and Importing Zipped files - 04-18-2008 , 12:47 PM



Thanks Charles for the detailed explanation!

Can you tell me why I can browse certain files/folders when using IE on an
ftp://ftp... site, but when I connect using the same username and password
via an ftp connect, I can't see all the files? (I'm using the exact same
user name and password when connecting via http:// using IE as I do for
setting up my ftp connection object).

Also, I would like to Unzip files using the Script Task in SSIS. Do you
know of any examples that show me how to use
System.IO.Compression.CompressionMode.Decompress.

I am trying to ftp a lot of zipped files to my server, and then
automatically unzipp them.

Thanks,

Jason

"Charles Wang[MSFT]" wrote:

Quote:
Hi Jason,
I understand that you would like to execute your FTP task to upload your
zipped files to your FTP site, however you could not connect to the server.
Also you would like to know how you can extract them in bulk after you
upload the files.
If I have misunderstood, please let me know.

Regarding FTP task, please first ensure that you have assigned Read/Write
permission to Everyone on the folder in your FTP site. After that you can
use anonymous account to connect to it.
Assume that you want to upload the files from your local folder
F:\Materials to the FTP site ftp://myftpserver/Materials. Then you can
refer to the following steps:
1. Create a FTP connection in Connection Managers pane.
Right click the pane, click New Connection..., select FTP and click
Add..., input your FTP server name as "myftpserver", input the server port
if it is not 21, leave user name as anonymous and leave password field
blank, and click Test Connection. This should be ok if you have manually
checked that you can connect to your ftp site anonymously from IE.
2. Drag a FTP task to Data Flow pane, double click it, select the
FtpConnection and give it a new name, the select "File Transfer" in the
left list, select your remote directory path to RemotePath field, select
OverwriteFileAtDest as True, select IsLocalPathVariable as True, click
LocalVariable and select <New Variable...> and input a variable with the
name "FileName", namespace User, value type String and value blank. After
you create the new variable, click OK.
3. Drag a Foreach Loop Container to your Data Flow pane and ensure that FTP
Task is within it, double click the task, give it a new name, then select
Collection at the left pane, select Enumerator as "Foreach File
Enumerator", then select your folder to Folder field, input "*.*" to Files
field, select Retrieve file name as "Fully qualified", then click the
Expression field in the top list, click the button (...), select Name as
the first property and then click the button(...), and drag User::FileName
to Expression field and click OK, then select Variable Mappings in the left
list, select User::FileName in the Variable list to match Index 0.

Regarding your question of extract them in bulk, I am afraid that you may
need to write an application by yourself to do it. Then you can use it in
an Execute Process Task in SSIS package.

Hope this helps. Please feel free to let me know if you have any other
questions or concerns. Have a nice day!



Best regards,
Charles Wang
Microsoft Online Community Support
================================================== =========
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg (AT) microsoft (DOT) com.
================================================== =========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for
non-urgent issues where an initial response from the community
or a Microsoft Support Engineer within 1 business day is acceptable.
Please note that each follow up response may take approximately
2 business days as the support professional working with you may
need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
================================================== ==========
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== =======







Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.