Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

creating hidden files on Windows using Java  RSS feed

 
Abhi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I want to create hidden files on Windows using Java. How do I go about doing this. Can anyone provide some sample code for doing this. Any help will be appreciated.
Thanks
Abhi
 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abhi,
Welcome to JavaRanch!
We don't have many rules here at JavaRanch, but we do have one. Please change your display name to comply with The JavaRanch Naming Policy.
Thanks Pardner! Hope to see you 'round the Ranch!
 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, I'm moving this to the I/O and Streams forum; you will probably get a better response there.
 
jason adam
Chicken Farmer ()
Ranch Hand
Posts: 1932
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only way I know to do this would be to do Runtime.exec( "attrib +H filename" )
 
Abhi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jason...I got it working using Runtime.exec()..
 
jason adam
Chicken Farmer ()
Ranch Hand
Posts: 1932
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No problem, glad to know you're fixed. And don't forget to change your display name (a last name is needed)!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!