Answered by:
SSIS package/Windows Command script

Question
-
Hi,
I am a .NET developer and am stuck up with a SSIS package which involves Windows command script.
The requirements are as follows:
The user will be placing zip files in the format "account_elpf0107_dg_0195_200811260916.csv"
on the FTP Server. Where account is the name of the table, elpf is a fund code,0195 is the month and year in mmyy format and the datetime stamp.
The user invokes the process through a web page by selecting a fund code( eg elpf,calc etc) for which the zip files are present on the server. The web page invokes a SQL job. The process of getting zip files from the FTP server to local machine is done by a Windows command script.
My question is : How can I get the files corrosponding to the fund chosen from the FTP server through the windows script which is executed through a Execute Process task. The files placed on the server are in a set of 4 files for 4 tables corrosponding to a fund e.g for the fund elpf there will be zip files account_elpf0107,Books_elpf0107,Total_elpf0107, property_elpf0107. All the 4 files based on the latest time stamp should be extracted when I send the parameter for a single fund.
Can you let me know how can we send dynamic parameters for the FTP windows script to achieve the above task? Right now the code for script is as follows:
::echo %path%
IF NOT [%1]==[] (SET LocalFilePath=%1
) ELSE (
GOTO end
)IF NOT [%2]==[] (SET FtpCommandPath=%2
) ELSE (
GOTO end
)
PUSHD %LocalFilePath%FTP -s:%FtpCommandPath% <servername>
POPD:end
The parameters are taken from a different file.As of now the parameters are fixed but I want the files from FTP ( All 4 files for a fund) that too, the latest files (based upon the timestamp).
Your help/suggestion would be immensely helpful as I am clueless.- Edited by Mike Walsh FIN Friday, November 28, 2008 2:55 PM "Urgent" and "high priority" moved from Subject and Text. "Clueless" left in.
- Moved by Mike Walsh FIN Friday, November 28, 2008 2:55 PM Off-topic (Moved from MSDN and TechNet Search Feedback to Off-Topic Posts (Do Not Post Here))
Friday, November 28, 2008 11:05 AM
Answers
-
Hello Anurag,
Thank you for your post! I would suggest creating a new thread for your question in the ( MSDN Forums » SQL Server » SQL Server Integration Services » SSIS Script task that FTP's files) forum located here: (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1258083&SiteID=1).Please copy and paste the link in the address bar.
Hope that would be helpful.Have a great day!
Thanks & regards,
Ashawani Tier 2 Application Support Server and Tools Online Engineering Live Services Team- Proposed as answer by ashawani_dubey Monday, December 1, 2008 5:11 AM
- Unproposed as answer by ashawani_dubey Monday, December 1, 2008 5:11 AM
- Proposed as answer by ashawani_dubey Monday, December 1, 2008 5:11 AM
- Marked as answer by ashawani_dubey Monday, March 9, 2009 9:30 AM
Monday, December 1, 2008 5:10 AM
All replies
-
Sighs.
Firstly, forums are not a place to post Urgent questions. For them Ring Microsoft Customer Support Services.
Secondly. Don't write "Urgent" anywhere in your subject or text. Typically we all have questions that are urgent to us. Where would we be if we all wrote that Urgent! all over the place.
Thirdly. You'll get faster replies if you post to the right forum.
This forum is for Feedback on Search for MSDN or TechNet.
Your question has nothing to do with that.
Moving to Off-Topics (and removing the "Urgent help requested" from the Subject and the "task is of utmost high priority" from the text)Friday, November 28, 2008 2:53 PM -
Hello Anurag,
Thank you for your post! I would suggest creating a new thread for your question in the ( MSDN Forums » SQL Server » SQL Server Integration Services » SSIS Script task that FTP's files) forum located here: (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1258083&SiteID=1).Please copy and paste the link in the address bar.
Hope that would be helpful.Have a great day!
Thanks & regards,
Ashawani Tier 2 Application Support Server and Tools Online Engineering Live Services Team- Proposed as answer by ashawani_dubey Monday, December 1, 2008 5:11 AM
- Unproposed as answer by ashawani_dubey Monday, December 1, 2008 5:11 AM
- Proposed as answer by ashawani_dubey Monday, December 1, 2008 5:11 AM
- Marked as answer by ashawani_dubey Monday, March 9, 2009 9:30 AM
Monday, December 1, 2008 5:10 AM