The INSERT statement can provide multiple rows at a time, in both MsSQl and MySql:
INSERT INTO table_name (column1, column2, ...) VALUES (value1, value2, ...) (nextValue1, nextValue2, ...)
So in this case you can assemble a command string which will insert many rows - normally I would not recommend this, as you should use parametrised queries to avoid SQL Injection attacks. In this case, you should probably check names and paths to make sure they do not contain SQL!
Use a StringBuilder, and assemble SQL in a loop:
StringBuilder sb = new StringBuilder();
sb.Append("INSERT INTO myTable (filename, path) VALUES ");
foreach (string file in files)
{
string path = ...;
string name = ...;
sb.AppendFormat("('{0}', '{1}') ", name, path);
}
string sqlCommand = sb.ToString();
Then all you have to do is break the file into the name and path. If you have set your DB to use an Identity field for the Index, it will handle that for you.