Can anyone tell me why this code wont work. Ive been looking everywhere. I want file.txt to be copied to the temp folder located in the Systemroot which is usually C:\winnt or C:\windows.
Const OverwriteExisting = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile "C:\file.txt" , "%SystemRoot%\temp", OverwriteExisting