Solved

cannot delete tmp files java

Posted on 2014-04-16
6
151 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
Comment Utility
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
Comment Utility
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
Comment Utility
Then the only other thing I can suggest is that you ensure you are logged in with admin rights.
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:ClaytonGlass
Comment Utility
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
Comment Utility
Thanks!
0
 
LVL 16

Expert Comment

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

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
strCount chalenge 3 50
mapShare challenge 13 67
groovy example issue 10 65
java 8 lambda expresssions exception handling 3 34
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This video teaches viewers about errors in exception handling.

772 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