What do you mean by un-needed files? Also why not use the built-in Disk Cleanup
tool by Microsoft which would do much more than required.
You need to exercise a little bit of caution since some Temp files are needed by Windows for future Windows Updates or application updates and if not present would cause the updates to fail.
- Compression of old files
- Temporary Internet files
- Temporary Windows files
- Downloaded program files
- Recycle Bin
- Removal of unused applications or optional Windows components
- Setup log files
- Off-line files