Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 11th, 2005, 2:17 PM   #1
cloud-
Hobbyist Programmer
 
Join Date: Jan 2005
Posts: 110
Rep Power: 4 cloud- is on a distinguished road
checking if a hidden dir exists >_<

i need my program to end if a directory exists
Const ChkDir = 16
    If (Dir$("C:\path", ChkDir) <> "") Then
End
End If
but i also use:
Shell (SysDir & "\attrib.exe +H " & Directory)
to make the dir hidden
and when i use that to check it doesnt end i just get an error
>.<

please help tx
cloud- is offline   Reply With Quote
Old Feb 12th, 2005, 8:19 AM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Instead of using SysDir & "\attrib.exe", why not just use "attrib"?
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Feb 12th, 2005, 10:18 AM   #3
cloud-
Hobbyist Programmer
 
Join Date: Jan 2005
Posts: 110
Rep Power: 4 cloud- is on a distinguished road
ok ill do that.
any idea how to check it exists?
if not
would it work if i checked if a file was in the folder if the files not hidden?

thanks
cloud- is offline   Reply With Quote
Old Feb 12th, 2005, 6:22 PM   #4
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
As far as I know, attrib is a system command, not a program. There's probably a Win32 API that does the same thing.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Feb 13th, 2005, 5:32 PM   #5
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
Try
vba.Dir("C:\hiddenfile.txt",vbHidden)
or to make it hidden:
SetAttr "C:\hiddenfile.txt, vbHidden
- always check to see if VB does it itself!
Rory is offline   Reply With Quote
Old Feb 14th, 2005, 5:11 AM   #6
cloud-
Hobbyist Programmer
 
Join Date: Jan 2005
Posts: 110
Rep Power: 4 cloud- is on a distinguished road
thanks alot ^_^
cloud- is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:57 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC