SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Populate a table with a directory's file info.

By bar8393,

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.
exec LoadFileDetailsIntoTable 'c:\winnt'
select * from FilesInDir where filesize > 100000
select min(fileDate) from FilesInDir
The Return Code will equal the number of files found.

Total article views: 446 | Views in the last 30 days: 4
Related Articles

Move File Cmds

Hello, Ina Stored Procedure I am using the move command to transport files. Is there a way to c...