Hello,
I need to check if a hidden file exist of not.
Since the function File() doesn't check hidden files, this can't be used.
How can I check if a hidden file exists ?
Thank you in advance for any help.
Function File() but for hidden files (solved)
Function File() but for hidden files (solved)
Last edited by driessen on Fri Jan 25, 2019 9:53 pm, edited 1 time in total.
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.09 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.09 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
- nageswaragunupudi
- Posts: 10721
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 8 times
- Contact:
Re: Function File() but for hidden files
With xHarbour, File( cHiddenFile ) returns .T.
But with Harbour, it returns .F.
We can use !Empty( DIRECTORY( cHiddenFile, "H" ) ) in both (x)Harbour
But with Harbour, it returns .F.
We can use !Empty( DIRECTORY( cHiddenFile, "H" ) ) in both (x)Harbour
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Function File() but for hidden files (solved)
Mr. Rao,
Thanks a lot for your help. It works fine.
Thanks a lot for your help. It works fine.
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.09 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.09 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Function File() but for hidden files (solved)
A thought just occurred to me, can we access DBFs and indexes that are hidden? This would prevent users from messing with these files.
Andi if so, can we create hidden files from code?
Andi if so, can we create hidden files from code?
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
- nageswaragunupudi
- Posts: 10721
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 8 times
- Contact:
Re: Function File() but for hidden files (solved)
James Bott wrote:A thought just occurred to me, can we access DBFs and indexes that are hidden? This would prevent users from messing with these files.
Andi if so, can we create hidden files from code?
Big YES.
Good idea is to hide the folder even.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Function File() but for hidden files (solved)
Great news.
Does FW just see them when we try to open them, or is there special syntax?
Does FW just see them when we try to open them, or is there special syntax?
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Function File() but for hidden files (solved)
Ok, I just tried hiding a folder and it's contents and the EXE still sees it.
I like it!
I like it!
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10