file import

Last Post 05 Jul 2008 09:49 AM by SQLUSA. 1 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
dbandee
New Member
New Member

--
01 Jul 2008 11:01 AM
Can some one help me with this?

i have to create DTS to import file on daily basis

The trick is application that exports the file creates multiple folders every day per day
so there can be 5 folders for today, applocation did five exports today
so tomorrow morning i want to import 5 txt files (one from each folder)
and format is like this:
\\Server\Exports\YYYYMMDDHHMMSS\YYYYMMDDHHMMSSMS.txt

\\Server\Exports\20080630053124\2008063005312425.txt
\\Server\Exports\20080630063155\2008063006315512.txt
\\Server\Exports\20080630083134\2008063008313401.txt
\\Server\Exports\20080630093114\2008063009311428.txt
\\Server\Exports\20080630113124\2008063011312430.txt

how do i do this?

Thanks

SQLUSA
New Member
New Member

--
05 Jul 2008 09:49 AM
You can use

EXEC master.sys.xp_dirtree 'f:\data\'

to chartup the directory/subdirectory structure.


Kalman Toth
www.sqlusa.com SQL Server Training


Acceptable Use Policy
---