What? A VBScript question?

Computer builds, hardware and software discussion or troubleshooting, including peripherals. Essentially a general place to talk about desktop computers.
Locked
User avatar
manadren_it
Posts: 1810
Joined: Wed Jan 01, 2003 6:48 pm

What? A VBScript question?

Post by manadren_it »

I doubt many here use a lot of vbscript, but what the heck.

I've been workin on a script at work that has to check the date of files ion specified folders. Problem is, every now and again one of these folders will dissappear, or the permissions will change (don't ask me howwhy). So far I've been using the FolderExists() Folder Method to check the folders, but it doesn't differentiate between a missing folder and an inaccessible one, it just reports false either way. What I need is a way to tell if the folder exists, but is inacessible, so I don't have to go in and manually check each time the FolderExists() method returns false.

Archived topic from Iceteks, old topic ID:4261, old post ID:34425
mana's blog {1, 2} yell at me when I get lazy
User avatar
rovingcowboy
Posts: 1504
Joined: Wed Dec 18, 2002 10:14 pm

What? A VBScript question?

Post by rovingcowboy »

:hmmm: :thinker:

Possible to use

Get Modified Date()

If

Get Modified Date = False

then

Alert = "Folder Missing?"

Archived topic from Iceteks, old topic ID:4261, old post ID:34427
roving cowboy/ keith
User avatar
manadren_it
Posts: 1810
Joined: Wed Jan 01, 2003 6:48 pm

What? A VBScript question?

Post by manadren_it »

I suppose I could try that, bit one would *assume* that if you could get a DateLastModified from an inaccessible folder, then FolderExists would be able to report True. I suppose the question is that is it reporting false with an inaccessible folder because it can't check the folder and thus can't tell if it's there or not, or because it's locked into a boolean return value and is reporting false for both instances. What I really need is a half-way decent VBScript reference bookwebsite :P. I'll try to remember to look at it at work Monday.

Archived topic from Iceteks, old topic ID:4261, old post ID:34464
mana's blog {1, 2} yell at me when I get lazy
Locked