Solved

cannot delete tmp files java

Posted on 2014-04-16
6
158 Views
Last Modified: 2014-04-16
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
Comment
Question by:ClaytonGlass
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 16

Expert Comment

by:krakatoa
ID: 40003435
Check for write protection and /or whether the file is in use at the time you try to delete it.
0
 

Author Comment

by:ClaytonGlass
ID: 40003439
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
 
LVL 16

Accepted Solution

by:
krakatoa earned 150 total points
ID: 40003450
Then the only other thing I can suggest is that you ensure you are logged in with admin rights.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:ClaytonGlass
ID: 40003453
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
 

Author Closing Comment

by:ClaytonGlass
ID: 40003454
Thanks!
0
 
LVL 16

Expert Comment

by:krakatoa
ID: 40003457
I *think* TMP is a 'type' for some reason (not sure exactly why) and that .tmp is the actual extension string.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
throw exception 21 67
jmss example java 2 32
Finding all private fields and their corresponding getters setters for nested classes 4 21
Tagging and Merging on Branch 1 41
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question