System Variables

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

System Variables

Post by armsys » Fri Feb 03, 2006 2:53 pm

I would like to write a script to delete all files in C:\Documents and Settings\%USER_NAME%\Local Settings\Temp. How could I implement it in Macro Scheduler script? None of the following statements succeeds.

del>C:\Documents and Settings\%USER_NAME%\Local Settings\Temp\*.TMP
del>C:\Documents and Settings\%USER_NAME%\Local Settings\Temp\~*.DOC
del>C:\Documents and Settings\%USER_NAME%\Local Settings\Temp\~*.XML

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Feb 03, 2006 3:47 pm

Looks fine to me. Are you sure you have permission to delete those files? They may be in use. It is not advisable to delete temporary files unless you are in safe mode and no other applications are running (or before windows has started up).
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts