Board index » jbuilder » change file attribute in windows xp

change file attribute in windows xp


2004-08-17 09:38:46 PM
jbuilder8
hi,
does anyone know if it is possible to set a file to invisible using java
classes under windows xp?
Any hints are appreciated.
Thanks in advance,
Marcel
 
 

Re:change file attribute in windows xp

Well, there's a way to cheat...
Use Runtime.getRuntime().exec() to call "attrib +h path\filename.ext" to
turn on the "hidden" attribute.
--
Check out our latest white papers at
www.datadevelopment.com/papers/index.html
BladeNET Scores With Borland Enterprise Tools
Team Development with JBuilder and Borland Enterprise Server
Dolphin Data Development Ltd.
www.datadevelopment.com/
"Marcel Hell" < XXXX@XXXXX.COM >wrote in message
Quote
hi,

does anyone know if it is possible to set a file to invisible using java
classes under windows xp?
Any hints are appreciated.

Thanks in advance,
Marcel



 

Re:change file attribute in windows xp

Marcel Hell wrote:
Quote
hi,

does anyone know if it is possible to set a file to invisible using java
classes under windows xp?
Any hints are appreciated.

Thanks in advance,
Marcel



All I can find is how to tell whether it is hidden or not. Not how to
set that value.
java.sun.com/j2se/1.4.2/docs/api/java/io/File.html()
Looks like you are stuck with a JNI solution. Rats.
--
Regards,
Lori Olson [TeamB]
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
www.google.ca/advanced_group_search
Other Newsgroup Searches:
www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
www.visi.com/~gyles19/fom-serve/cache/1.html
 

{smallsort}