Solved

cannot delete tmp files java

Posted on 2014-04-16
6
156 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupSum5 challenge 5 84
java 8 lambda expresssions exception handling 3 90
java jdbc batch example 8 34
hibernate example using maven 12 42
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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 theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

778 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