Solved

cannot delete tmp files java

Posted on 2014-04-16
6
160 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
Industry Leaders: 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

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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
jsp login check 12 67
Fast way to search item into Java Array (Rhino compatible) 2 47
Eclipse for Java EE development 2 68
Strange router problem - can't access hotmail.com 14 108
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

751 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