Get files in different folder using sql
- From: ntuyen01@xxxxxxxxx
- Date: 9 Aug 2006 08:23:01 -0700
Hi All,
I have a multiple files, but they are store in different directory on
the server. I want open those files and insert it into the database
using bcp.
Example files structure dir:
\\xyz\123\abc\text1.txt
\\xyz\123\abc\text2.txt
\\zyz\123\999\text2.txt
bcp "dabase" in \\xyz\123\abc\text1.txt -c -S"servername' -Usa
-Ppassword -T".
is there away to loop througth each dir, get the files, excecute the
bcp, then go to next folder.
Please help. Thanks in advance.
Ted Lee
.
- Follow-Ups:
- Re: Get files in different folder using sql
- From: Erland Sommarskog
- Re: Get files in different folder using sql
- From: ntuyen01
- Re: Get files in different folder using sql
- Prev by Date: Skip rows where the first column with letter 'S' - BCP
- Next by Date: Re: SQL Server Management Studio can't 'see' the 2005 engine?? But can see 2000 ?!?
- Previous by thread: Skip rows where the first column with letter 'S' - BCP
- Next by thread: Re: Get files in different folder using sql
- Index(es):
Relevant Pages
|