A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Java
»
Beginning Java
Author
Need Help In java.io.File
Muddassir Sayeed
Greenhorn
Joined: Jul 08, 2001
Posts: 7
posted
Jul 09, 2002 04:08:00
0
hi
I am using
java.io.File
. 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.
Thanks
Waiting gor reply
Rene Larsen
Ranch Hand
Joined: Oct 12, 2001
Posts: 1179
I like...
posted
Jul 09, 2002 06:59:00
0
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.
/Rene
[ July 09, 2002: Message edited by: Rene Larsen ]
Regards, Rene Larsen
Dropbox Invite
I agree. Here's the link:
http://aspose.com/file-tools
subject: Need Help In java.io.File
Similar Threads
XSLT problem with javaScript removeAttribute()
non-editable in textarea
How to Convert a java.io.File to struts FormFile?
Access Denied Error...
Program to check whehter a file is read-only / write
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter