From: lolguy on
hey i m wondering if a person could detect a hidden file then if its
hidden then remove hidden attribute for it and delete file
is there a function for detecting hidden file and removing there
attributes?
From: Christian ASTOR on
On 8 oct, 13:56, lolguy <tbgra...(a)gmail.com> wrote:
> hey i m wondering if a person could detect a hidden file then if its
> hidden then remove hidden attribute for it and delete file
> is there a function for detecting hidden file and removing there
> attributes?

FindFirstFile() finds files with FILE_ATTRIBUTE_HIDDEN attribute...
From: [Jongware] on
Christian ASTOR wrote:
> On 8 oct, 13:56, lolguy <tbgra...(a)gmail.com> wrote:
>> hey i m wondering if a person could detect a hidden file then if its
>> hidden then remove hidden attribute for it and delete file
>> is there a function for detecting hidden file and removing there
>> attributes?
>
> FindFirstFile() finds files with FILE_ATTRIBUTE_HIDDEN attribute...

Yeah, but rather more easier (because you don't have to write a program)
is to set "Show Hidden Files" in the Explorer, as it defaults to not
showing them. Select the file, pop up its properties and un-check
'hidden'. Or, select the file and throw it away.

Hiding files in the OS used to be an effective safety measure, back in
the '80s. Perhaps it's time for a revisit if this 'trick' needs to be
asked about in a programmers' forum :-)

[Jw]
From: Vincent Fatica on
On Thu, 8 Oct 2009 04:56:09 -0700 (PDT), lolguy <tbgrafix(a)gmail.com> wrote:

|hey i m wondering if a person could detect a hidden file then if its
|hidden then remove hidden attribute for it and delete file
|is there a function for detecting hidden file and removing there
|attributes?

In a FindFirstFile/FindNextFile/FindClose loop examine
WIN32_FIND_DATA::dwFileAttributes and if you find FILE_ATTRIBUTE_HIDDEN, change
attributes with SetFileAttributes.
--
- Vince
From: r_z_aret on
On Thu, 08 Oct 2009 15:15:15 +0200, "[Jongware]" <sorry(a)no.spam.net>
wrote:

>Christian ASTOR wrote:
>> On 8 oct, 13:56, lolguy <tbgra...(a)gmail.com> wrote:
>>> hey i m wondering if a person could detect a hidden file then if its
>>> hidden then remove hidden attribute for it and delete file
>>> is there a function for detecting hidden file and removing there
>>> attributes?
>>
>> FindFirstFile() finds files with FILE_ATTRIBUTE_HIDDEN attribute...
>
>Yeah, but rather more easier (because you don't have to write a program)
>is to set "Show Hidden Files" in the Explorer, as it defaults to not
>showing them. Select the file, pop up its properties and un-check
>'hidden'. Or, select the file and throw it away.

or
dir /ah
at a DOS prompt


>
>Hiding files in the OS used to be an effective safety measure, back in
>the '80s. Perhaps it's time for a revisit if this 'trick' needs to be
>asked about in a programmers' forum :-)

Hiding files means folks must do something unusual. That provides some
protection from the clueless and the mostly honest (not always the
same). That may be enough in at least some cases.

>
>[Jw]

-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 400
Boston, MA 02116
www.penfact.com
Useful reading (be sure to read its disclaimer first):
http://catb.org/~esr/faqs/smart-questions.html