![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: Jan 2005
Posts: 110
Rep Power: 4
![]() |
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 IfShell (SysDir & "\attrib.exe +H " & Directory) and when i use that to check it doesnt end i just get an error >.< please help tx |
|
|
|
|
|
#2 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Instead of using SysDir & "\attrib.exe", why not just use "attrib"?
|
|
|
|
|
|
#3 |
|
Hobbyist Programmer
Join Date: Jan 2005
Posts: 110
Rep Power: 4
![]() |
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 ![]() |
|
|
|
|
|
#4 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
As far as I know, attrib is a system command, not a program. There's probably a Win32 API that does the same thing.
|
|
|
|
|
|
#5 |
|
Expert Programmer
|
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! |
|
|
|
|
|
#6 |
|
Hobbyist Programmer
Join Date: Jan 2005
Posts: 110
Rep Power: 4
![]() |
thanks alot ^_^
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|