LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-18-2010, 07:04 AM   #1
Lobinho
Member
 
Registered: May 2010
Distribution: Ubuntu
Posts: 72

Rep: Reputation: 18
create windows hidden file from linux using c++


Hi,

Lets start with useful information:
I need to create a hidden file for windows/linux using my c++ program.
The file will be created on a mp3 player (fat32 file system) and the name will be ".myFile", so the file will appear hidden on linux system (period before the name).

The problem:
Using windows I'm able to see this file, cause the "hidden" attribute is not set.
On Windows API there's a function to do that (CreateFile), then I was trying to find a compatible function to set the hidden attribute, but there's no success until now.

Could someone show me the way?

There's a program to change these attributes: mattrib
I will try (again) to find the source code, if someone knows where could I find it, please post here.

Thanks in advance.
 
Old 10-18-2010, 09:21 AM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Quote:
Originally Posted by Lobinho View Post
There's a program to change these attributes: mattrib if someone knows where could I find it, please post here.
The source code for mattrib is with the rest of mtools, and can be downloaded from your distro repository or from the GNU website.
 
Old 10-19-2010, 05:28 AM   #3
Lobinho
Member
 
Registered: May 2010
Distribution: Ubuntu
Posts: 72

Original Poster
Rep: Reputation: 18
Thanks neonsignal, I'll take a look!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] mounted windows volume folders are hidden on linux, visible from mac or windows florenceit Linux - Software 4 10-11-2010 02:55 AM
Under linux how to set the attribute of a file to make it hidden? zhaohuiyu2 Linux - Newbie 7 04-15-2009 09:09 AM
How to make files hidden from windows when using linux.? ciden Linux - Newbie 5 05-19-2008 02:17 AM
How to hide Windows hidden files in Linux Beauford-2 Linux - Server 1 02-27-2007 06:02 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration