• you need to use the alter database statement (look in BOL). you specify the new filename for the data and log files and then restart the sql service.

    As SQL starts with a fresh tempdb each time it will just build one in the new path you specified. Then you can just delete the old mdf and ldf.

    USE master;

    GO

    ALTER DATABASE tempdb

    MODIFY FILE (NAME = tempdev, FILENAME = 'E:\SQLData\tempdb.mdf');

    GO

    ALTER DATABASE tempdb

    MODIFY FILE (NAME = templog, FILENAME = 'E:\SQLData\templog.ldf');

    GO