This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Files control Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Files control" Watch "Files control" New topic
Author

Files control

Chiranjeevi Kanthraj
Ranch Hand

Joined: Feb 18, 2008
Posts: 289

Hi all

I'm using Windows OS and i want to save the files on Hard disk.
And i want to control that files should not delete manually.

Is it possible if not why?

Thanks


-Chiru
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

Just see this page for how to use file save dialog. Also I don't think that you can control deletion of files manually from the OS...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Chiranjeevi Kanthraj
Ranch Hand

Joined: Feb 18, 2008
Posts: 289


Thanks

If we set the Read only and Not executable attributes some how we can control i think.

And one more

How can i delete the File path tree
means file.delete() will work only if the Dir is empty that's why
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

Recursively delete the tree:


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Files control
 
Similar Threads
How do I add a jar file to artifactory?
Controlling Java Compiler by Program
File upload filter
how to install selenium remote control on mac.?
How to avoid the internet files which will be stored in internet temporary folder?