473,402 Members | 2,072 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

find and delete a given file(s)

momotaro
357 100+
Hi everyone,
Am trying to come up with a way to look up for given files in a given directory and delete them.
something like:
Expand|Select|Wrap|Line Numbers
  1. ArrayList<File> find(directoryName)
  2. File find(fileName)
  3.  
thx!
Jul 29 '11 #1

✓ answered by Dheeraj Joshi

Use FileUtil class in common.io package of apache.

Here is the api docs.

Regards
Dheeraj Joshi

1 1981
Dheeraj Joshi
1,123 Expert 1GB
Use FileUtil class in common.io package of apache.

Here is the api docs.

Regards
Dheeraj Joshi
Aug 1 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: DCK | last post by:
Hello I've path to file, which look like this: \\COMPUTER\D$\C++\FILE_TO_DELETE.JPG This path was generated by os.path.walk() function. When i try to delete this file, os.remove() can't find...
0
by: SeanR | last post by:
I have a function to copare two files. It will first copy the original file form a different server to a local temp path and then compare that version to a version that has been restored form tape....
23
by: da Vinci | last post by:
Greetings, Onwards with the school studying. Working on a program and need to delete a file from a known location on the hard drive but cannot get anything I do to work. I have tried to use...
3
by: News | last post by:
Is it possible to delete a file by copying it to the "bit bucket" or "null device"? Back in my youth when I live in VMS-land you could delete a file by copying it to NL: ========== I have...
5
by: Neven Klofuar | last post by:
hi, I have a problem when trying to delete a file. I have to extract some information from a file, and then I have to delete it. When I try to delete it after I read it, I get a "Access...
7
by: marce1972 | last post by:
Hi to all, that's my question I have mysql database and a web page to upload files to my webpage, I know how to delete them from the database, but didnt find the code to delete them from the web...
5
by: yinglcs | last post by:
Hi, I read this article to talk about all file operation in C++. http://www.cplusplus.com/reference/clibrary/cstdio/fread.html Can you please tell me how to delete a file (from the operation...
36
by: pearl146 | last post by:
Hi, I have some database files (.MDF, .LDF,...) on the server. When I try to delete them, the warning "Cannot delete file: There has been a sharing violation. The source or destination file may...
7
by: ganeshp | last post by:
Code to delete the file is given below: File file = new File(filePath); file.delete(); But this code does not delete the file. Please post your thoughts on this issue. Regards, Ganesh
1
by: Zuhaib Hyder | last post by:
how to delete client file using c# or javascript ? file delete prmissions are already given?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.