Link to home
Start Free TrialLog in
Avatar of UpAllNite
UpAllNite

asked on

Checking for a Directory and Returning File Info

This is a two part question. First part is easy, second is more difficult.  

First part is...How do I verify if a directory exists and if so do xxxx, if not then create it?

Second part - How do I call or retreive a File's Product Name, Description, and Version Number information into 3 diffrent variables? I know this would only apply to files that had this info, and in this case I would be checking my own exe's.

Thanks in advance
ASKER CERTIFIED SOLUTION
Avatar of spurssy
spurssy

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 michelv
michelv

Well the answer is correct, for a directory that does not exist in one-depth tree, but what if this directory doesn't exist:

C:\Temp\From\Here\Its\a\whole\new\directory

and eg. C:\Temp does exist...

a MkDir "C:\Temp\From\Here\Its\a\whole\new\directory"

won't work here...

You need recursive...

About the info in EXE files, search the web for PE-Header file desciption, there you'll find the answer, if you wan't more info on the above, just comment it and I'll try to answer...


Greetz,

Michel

Avatar of UpAllNite

ASKER

As far as the second part:  What I need to do is obtain the (Windows Properties Sheet Information) from each file that I specify (FileName,Product Name,File Description, Version Number) and place that in a listview.

File #1: abc.exe,Product Name,File Description,Version Number
File #2: efg.ocx,Product Name,File Description,Version Number
File #3: xyz.dll,Product Name,File Description,Version Number

After that I will loop through the list to process each file based on the information obtained above.