Technical Article

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

454 reads

Blogs

Daily Coping 21 Oct 2021

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

#PowershellBasics: Get a list of files from a directory.

By

I’ve got a project I’m working on at the moment and it includes a...

Join me next week at my first GroupBy session

By

2021 has been the year people want to learn about Temporal Tables, it seems....

Read the latest Blogs

Forums

Managed Instance, cross-database queries. What are the hidden requirements?

By ja_iris

Have a managed instance with 2 databases. In theory I should be able to...

Need the (default) port to connect - why is this not implicit.

By snomadj

So I have 2 instances (1 x 12, 1 x 19). Both have the...

Extract data from XML field

By SqlRookie

Hello, I have a SQL view with a column called GlobalCountryRegionXML. Here is an...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers