Use SQL INSERT to Create Directories with FileTable

filestream, filetable, sql-server-2012, t-sql

Solution

The following worked for me. Hopefully this helps out someone else.

INSERT INTO FileTable0 (name,is_directory,is_archive) VALUES ('Directory', 1, 0);

- You should also check out Bob Beauchemin's Techdays 2012 video for more details on `FileStream` and its evolution into `FileTable`.

Problem

Is there a way to create directories in a FileTable without using File I/O APIs? Is it just as simple as creating a SQL INSERT statement? This is my first experience with SQL Server 2012 and I'm not familiar with the limits of the `FileTable` from within SQL Server.

Original source

Related problems