473,385 Members | 1,655 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,385 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 1979
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.