File names to database table
folder = r'\\my\network\folder'
subfolder_list = [r'\DRAWINGS', r'\DOCUMENTS', r'\VIDEOS']


Don't write the type into the variable name. The type should be able to change without the variable having to be renamed. subfolders already tells you that it is a collection of subfolders. subfolder_names might be better, to make clear that it contains the folders' names, not wrapper objects for the file system.

Removing the backslash from the beginning can prevent you from having to read up the code to make sure where the backslash is, at the beginning or the end. subfolder or subfolder_name implies just the name. So add the backslash wherever you concatenate the strings.



#Delete all records in the table
db_exec = conn.execute('delete from records')


That comment is obsolete, as it adds no information that is not already in the next line of code.



#Loop through the list of subfolders
for i in subfolder_list:
    #loop through the files in the subfolder
    for filename in os.listdir(folder + i):
        #insert the file names into the table
        db_exec = conn.execute('insert into records (file_name) values (' + filename + '\')')


Again, the comments are not needed, and instead impair readability. Instead of explaining with comments what the code does, improve the code to better explain itself. i can be acceptable as a loop variable, but whenever possible, use a more explicit name, like in this case subfolder_name. Then you get this more expressive code:

for subfolder_name in subfolder_names:
    for file_name in os.listdir(folder + r'\' + subfolder_name)
        db_exec = conn.execute('insert into records (file_name) values (' + file_name + '\')')




#Commit the insert statements
db_exec = conn.execute('commit')


Again the comment is not needed.



print "Complete."


What is complete? Give the user more info, e. g. `"42 file names inserted into database."