Populate a table with a directory's file info.

I use this SP to return full directory information into a table.  FilePath, FileName, Filedate and FileSize are parsed from a 'dir /n/on/-c ' command. FilesInDir is the table created. usage: exec LoadFileDetailsIntoTable 'c:\winnt'select * from FilesInDir where filesize > 100000select min(fileDate) from FilesInDirThe Return Code will equal the number of files found.

2002-03-05

447 reads

Blogs

Daily Coping–3 Apr 2020

By

I’ve started to add a daily coping tip to the SQLServerCentral newsletter, which is...

Data Céilí 2020 Cancelled

By

Yesterday we announced that Data Céilí 2020 has been cancelled due to the continuing...

Code from Redgate Streamed

By

I presented a session today at Redgate Streamed and did a number of demos....

Read the latest Blogs

Forums

Fully Qualified Name

By inspector

First time poster...not sure this the correct section to post this question.  I have...

expand field and fill with zeros

By mbatchelor

I am using this statement: Select @Data = @Data + RIGHT('00000000000' + CAST( (SUBSTRING(STR(@qtramt1),1,11))...

sp_send_email doesnt work when you insert @query

By zouzou

Hi all I have an issue when i try this it gives me an...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers