Use some type of a script that you are comfortable with - cmd, perl, Powershell or anything else. If you are using Powershell, a script such as this would be what you need - this is only a template, you will need to make appropriate changes to your path, filenames etc.:$id = 1;foreach ($filename in Get-ChildItem 'C:\temp\*.xml' ){ Write-Host "Inserting id = $id, filename $filename"; sqlcmd -d YourDatabaseNameHere -Q ` ( ` "INSERT INTO dbo.Test SELECT $id AS ID,* FROM OPENROWSET(BULK '$filename', SINGLE_BLOB) AS DATA " ` ) $id++;}