A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Need Help In java.io.File
Joined: Jul 08, 2001
Jul 09, 2002 04:08:00
I am using
. I have set the file readonly from method setReadOnly() now i want to remove readonly attribute. is there any methos available to do so? and also tell me how to make a file hidden.
Waiting gor reply
Joined: Oct 12, 2001
Jul 09, 2002 06:59:00
You can not do it in Java, BUT you can do it like this:
Runtime.getRuntime().exec("cmd /c attrib +H test.txt");
Where '-H' is remove hidden attribute and '+H' is set hidden attribute.
[ July 09, 2002: Message edited by: Rene Larsen ]
Regards, Rene Larsen
I agree. Here's the link:
subject: Need Help In java.io.File
Access Denied Error...
Program to check whehter a file is read-only / write
How to Convert a java.io.File to struts FormFile?
non-editable in textarea
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014