Using xp_create_subdir to Create Windows Folders with SQL June 15, 2017 Did you know that you can create Folders with T-SQL? With the help of the built-in Extended Stored Procedure named xp_create_subdir you can. Here is a small example: DECLARE @DBName