Link to home
Start Free TrialLog in
Avatar of isnoend2001
isnoend2001Flag for United States of America

asked on

Check if 2 files exist

I am making a registration module that compare 2 files contents
i have a Boolean function that checks if files exist
    Dim sFileOneExists As Boolean
    Dim sFileTwoExists As Boolean

sFileOneExists = FileExists(sFileNameOne)
sFileTwoExists = FileExists(sFileNameTwo)

whats the best way to write this ?
if neither exists then they are created
if only one exists then the program has been hacked
if they both exist then they are opened and compared
using vb6
Avatar of Member_2_861731
Member_2_861731
Flag of Canada image

That can be done using the FileSystemObject model in VB6.

See this: Link

P.S. If I get a chance I might write some of the code to check for the files, but I can't guarantee anything.

Hope it helps.
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of isnoend2001

ASKER

LIONKING, not looking for file open, save or exists
thank you MartinLiss, just what i needed
You're welcome and I'm glad I was able to help.

My profile contains links to some articles I've written that may interest you.
Marty - MVP 2009 to 2012