File System


Create Folder from TSQL - Originally part of a dynamic DB backup solution, this illustrates how to check for existence and create a subfolder structure from TSQL.

Check if File Exists from TSQL - Uses the extended procedure xp_fileexists to check whether a file exists from TSQL.

Delete Files Older Than... - Not TSQL, but a batch file that can be invoked from a SQLAgent job. Does not use xp_cmdshell.