IT Community - Software Programming, Web Development and Technical Support

How to target the file name with date variable ?

This is a discussion on How to target the file name with date variable ? within the C# Programming forums, part of the Software Development category; Hi.. My client will upload a file to a FTP folder regularly, but the time pattern is unknown, only thing ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > C# Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-24-2007, 11:21 PM
theone theone is offline
D-Web Sr.Programmer
 
Join Date: Jun 2007
Posts: 129
theone is on a distinguished road
Question How to target the file name with date variable ?

Hi.. My client will upload a file to a FTP folder regularly, but the time pattern is unknown, only thing I know is he'll use today's date as the file name. for example, he uploaded a file 'wk070705_id.txt' today, but I don't know when the next file will be uploaded. So how can i write a package like, every time when he upload a new file (for example if he upload a file 'wk070708_id.txt'), I can import the data into my table? I am a very newbie of SIS; it would be perfect if I can get a full script for this. Thanks in advance with appreciation!

ps: the date in file name is yymmdd
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-24-2007, 11:26 PM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Default Re: How to target the file name with date variable ?

Hi... I have given some explanation for your query.. Hope this helps...

1. One way i can think of is to make use of gateway service to poll that directory and as soon as file arrives, parse the file name and load the corresponding package.
2. If you have normal file system access to the folder then you can use this task -http://www.sqlis.com/23.aspx
If you only have FTP access then polling is the way to go. You can request the file, but nee dto make the parameter dynamic based on todays date, for which you can use a property expression. Have a look in Books Online for the references to property expressions in SSIS they are what make it flexible and dynamic.
Some example date expressions - Expression Date Functions
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert a date in milliseconds back to a date string itbarota HTML, CSS and Javascript Coding Techniques 2 03-03-2008 09:03 PM
How can I show the documents last modified date in the format: month, date, year, tim Pvinothkumar HTML, CSS and Javascript Coding Techniques 3 12-28-2007 05:58 AM
How to find the Starting date of week from a particular date kingmaker C# Programming 1 08-16-2007 11:25 PM
How to convert a date to a globally accepted date format, in DOT NET 2005? Archer C# Programming 1 07-25-2007 03:21 AM
Static Global Variable and Static Local Variable vigneshgets C and C++ Programming 1 05-30-2007 11:50 AM


All times are GMT -7. The time now is 10:31 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0