dbTalk Databases Forums  

get text files from a folder

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


Discuss get text files from a folder in the microsoft.public.sqlserver.dts forum.



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

Default get text files from a folder - 01-14-2005 , 08:59 AM






Hi all!
I have a package that imports data from a text file, located in an specific
folder.
My problem is that many files can be inside the folder and their names are
unknown for me. How can I find out the name and quantity of files within the
folder, and use these informations into a dynamic task to start the import
process?
Thank you all in advance!
Eduardo



Reply With Quote
  #2  
Old   
Mark
 
Posts: n/a

Default Re: get text files from a folder - 01-14-2005 , 08:07 PM






You can install Perl package and do it by perl script. By perl you can check
the file names and quantity and rename the file names to meet your DTS
package needs. Then you can invoke the dtsrun by system("dtsrun ....") from
the perl script.



Mark


"Eduardo Greco" <eduardo (AT) persocom (DOT) com.br> wrote

Quote:
Hi all!
I have a package that imports data from a text file, located in an
specific
folder.
My problem is that many files can be inside the folder and their names are
unknown for me. How can I find out the name and quantity of files within
the
folder, and use these informations into a dynamic task to start the import
process?
Thank you all in advance!
Eduardo





Reply With Quote
  #3  
Old   
Ed
 
Posts: n/a

Default RE: get text files from a folder - 01-14-2005 , 09:53 PM



did you try the scripting.filesystemobject?

Ed

"Eduardo Greco" wrote:

Quote:
Hi all!
I have a package that imports data from a text file, located in an specific
folder.
My problem is that many files can be inside the folder and their names are
unknown for me. How can I find out the name and quantity of files within the
folder, and use these informations into a dynamic task to start the import
process?
Thank you all in advance!
Eduardo




Reply With Quote
  #4  
Old   
Eduardo Greco
 
Posts: n/a

Default Re: get text files from a folder - 01-15-2005 , 06:00 AM



How to do it?

"Ed" <Ed (AT) discussions (DOT) microsoft.com> wrote

Quote:
did you try the scripting.filesystemobject?

Ed

"Eduardo Greco" wrote:

Hi all!
I have a package that imports data from a text file, located in an
specific
folder.
My problem is that many files can be inside the folder and their names
are
unknown for me. How can I find out the name and quantity of files within
the
folder, and use these informations into a dynamic task to start the
import
process?
Thank you all in advance!
Eduardo






Reply With Quote
  #5  
Old   
Michael Vardinghus
 
Posts: n/a

Default Re: get text files from a folder - 01-15-2005 , 10:25 AM



Or you could use this brilliant site ....

http://www.sqldts.com/default.aspx?246


"Eduardo Greco" <eduardo (AT) persocom (DOT) com.br> wrote

Quote:
How to do it?

"Ed" <Ed (AT) discussions (DOT) microsoft.com> wrote in message
news:E0C5A644-35E0-4DE6-8FD3-76CBAD5511BD (AT) microsoft (DOT) com...
did you try the scripting.filesystemobject?

Ed

"Eduardo Greco" wrote:

Hi all!
I have a package that imports data from a text file, located in an
specific
folder.
My problem is that many files can be inside the folder and their names
are
unknown for me. How can I find out the name and quantity of files
within
the
folder, and use these informations into a dynamic task to start the
import
process?
Thank you all in advance!
Eduardo








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.