• In many of the databases that I work with, we have a configuration table, that store information that is needed for various tasks. You could create such table and have one of the things that you store in it, the file's number. Each time after you create a file, you'll add 1 to this value.

    Adi

    --------------------------------------------------------------
    To know how to ask questions and increase the chances of getting asnwers:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/