The detach won't work (so I gues it's afe'.
To move tempdb
alter database tempdb modify file (name='tempdb', filename='<path>\tempDB.MDF')
alter database tempdb modify file (name='templog', filename= '<path>\TempDB.LDF')
It will be recreated on restart and you can delete the old files.
======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.