Solved

cannot delete tmp files java

Posted on 2014-04-16
6
154 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
  • 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

930 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now