• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 170
  • Last Modified:

cannot delete tmp files java

HI:
An observation rather than a problem as I have worked round it but:
I wrote a java utility to delete all files over 48 hours old ending '.tmp' in the directory 'C:\\users\\xxxx\\AppData\\Local\\Temp' - and it will not. xls files yes; also pdf, etc - even '.TMP'. But not '.tmp'.
Has anybody else seen this effect?


Thanks!
0
ClaytonGlass
Asked:
ClaytonGlass
  • 3
  • 3
1 Solution
 
krakatoaCommented:
Check for write protection and /or whether the file is in use at the time you try to delete it.
0
 
ClaytonGlassAuthor Commented:
I have checked for read/write - and they are not; also files over 48 hours old tend not to be in use? This is not a major issue as I use DOS delete which works; just a curiosity, but thanks anyway!
0
 
krakatoaCommented:
Then the only other thing I can suggest is that you ensure you are logged in with admin rights.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
ClaytonGlassAuthor Commented:
Thanks Krakatoa. I guess you may be right - the DOS delete needs to be run as administrator. Puzzled as to how it only affects tmp, though - not even TMP!
0
 
ClaytonGlassAuthor Commented:
Thanks!
0
 
krakatoaCommented:
I *think* TMP is a 'type' for some reason (not sure exactly why) and that .tmp is the actual extension string.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now