Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Hidden Files

Author
Message
Bmad6
19
Years of Service
User Offline
Joined: 25th Aug 2005
Location: Virginia, United States
Posted: 23rd Nov 2005 15:53
I'm making a program that searches a given folder for certain file types. is there any way to determine whether a file is hidden or not? Because, DB will not access hidden files (generates an error), but it doesn't know they're hidden until it tries 2 access them.... any ideas??

--Brian
Dodic
19
Years of Service
User Offline
Joined: 6th Nov 2005
Location: SNM (Serbia&Montenegro)
Posted: 23rd Nov 2005 20:24
maby there is some dll for that , db itself can`t do it , so maby you could WRITE a dll (if you know to write dlls) or try to find one (but i doutgh you will find one)

http://dodica.proboards75.com/index.cgi
first 20 are mods. i have 9 sofar.
Bmad6
19
Years of Service
User Offline
Joined: 25th Aug 2005
Location: Virginia, United States
Posted: 23rd Nov 2005 22:06
I can do some C++ and Visual Basic programming, but I'm not sure whether VB can make .dll's and I haven't done C++ in forever. I'll look into it, tho... thanx.

--Brian
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 24th Nov 2005 08:56 Edited at: 24th Nov 2005 08:57
Yes, VB *can* make DLLs.

Not ones that work with DB, but if you e-mail or add me to your MSN then I'll dig up some plugins (plugins for the VB6 IDE) that compile 'normal' DLLs instead of ActiveX ones. John Chamberlin's Compile Controller is an excellent piece of software, but you've still got to write the Exports first. I'll be more than happy to help you (or anyone) out with that.

Er... You are using Visual Basic 6, right?

16-colour PNGs pwn.
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 24th Nov 2005 13:23 Edited at: 24th Nov 2005 13:59
Quote: "I'm making a program that searches a given folder for certain file types. is there any way to determine whether a file is hidden or not? Because, DB will not access hidden files (generates an error), but it doesn't know they're hidden until it tries 2 access them.... any ideas??"


You can do this:


This runs the attrib program via the command prompt and sends the output to "att.txt". Change the directory string to whatever directory you're working in (you can use "Directory$=get dir$()" ). The file will be located in Directory$. You can open it up and check the contents of that file to see file attributes.

It'll be like this (I changed upgrade5_8.txt's attributes for this example):


Each letter on the left side represents:
A = Archive
S = System
H = Hidden
R = Read Only

If you want to check for a specific file do this:


It's a messy way to do it (flashes the command prompt window)... but it works.

Just in case you don't know... attrib is not only for listing the attributes for each file but you can use it to edit the attributes. So you can make a program that automatically unhides a file before loading it.

Here's the attrib syntax:


Also it doesn't work too well in full screen (big white screen) so you'll have to put it into windows mode before "execute file" then back into full screen after it.



Hope this helps.
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 26th Nov 2005 06:59


Just change the filename on the line:

FName$="Hidden.txt"

to the name of the file you want to test.

TDK_Man

Login to post a reply

Server time is: 2025-05-22 22:13:19
Your offset time is: 2025-05-22 22:13:19