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
 General SQL Server Forums
 New to SQL Server Programming
 Listing files - file names truncated

Author  Topic 

SR
Starting Member

3 Posts

Posted - 2010-10-12 : 12:20:15
Hi,

Anyone have any idea why the first three characters are missing from the list when I run this?

EXEC sp_ListFiles 'C:\Program Files\',NULL,NULL,NULL,1




BEM
dows NT
erence Assemblies
ernet Explorer
ine Services
iris
itas
look Express
ML 6.0
mon Files
OpenView
paq
Plus Applications
port Tools
rosoft CRM SRS Data Connector
rosoft Office
rosoft SQL Server
rosoft.NET
uild
XML 4.0

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-10-12 : 12:40:04
What is the source code of sp_ListFiles?


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

SR
Starting Member

3 Posts

Posted - 2010-10-12 : 12:40:31
Actually ignore, I don't think this exists as a built-in procedure.
Go to Top of Page

Sachin.Nand

2937 Posts

Posted - 2010-10-12 : 12:41:18
No it exists.But is undocumented.

PBUH

Go to Top of Page

SR
Starting Member

3 Posts

Posted - 2010-10-12 : 13:13:38
Ah well, doesn't matter, this looks a lot more like what I've been looking for:
http://www.sqlusa.com/bestpractices2008/list-files-in-directory/

Thanks anyway!
Go to Top of Page
   

- Advertisement -