Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 strange question

Author  Topic 

inbs
Aged Yak Warrior

860 Posts

Posted - 2010-02-07 : 03:39:34
i want to know what the name of my files in the directory and put it in the table or in excel

for example:


NameFile DateModified Path
aaa.txt 27-01-2010 D:\aaa.txt
bbb.txt 28-01-2010 C:\bbb.txt

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2010-02-07 : 04:08:12
use xp_cmdshell with DIR command


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2010-02-07 : 04:17:07
do you have the code for that?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-07 : 10:41:35
if your reqmnt is to import data from files in a folder to table then you could just design a ssis package with for each file enumerator
Go to Top of Page
   

- Advertisement -