Discussion:
A file or a folder?
(too old to reply)
Harry Potter
2019-02-15 00:11:51 UTC
Permalink
Say I am given a path for one of my programs. It could be a file or a folder. It could also be a partial path. How do I determine whether it is a file or a folder? Also, how do I convert it to a full path?
R.Wieser
2019-02-15 06:51:59 UTC
Permalink
Harry,
Post by Harry Potter
How do I determine whether it is a file or a folder? Also, how do I
convert it to a full path?
Have you already googled for that ? What did you use for the search terms
?

Functions for the first question can be found in shlwapi, the latter in
kernel32. No, I'm not giving you the answer on a silver platter. You
still have to do some of the work yourself.

And by the way: The above is true for my own version of the OS. And as you
didn't specify which version you are using ...

Regards,
Rudy Wieser
JJ
2019-02-15 13:42:53 UTC
Permalink
Post by Harry Potter
Say I am given a path for one of my programs. It could be a file or a
folder. It could also be a partial path. How do I determine whether it
is a file or a folder?
From only a file path? You can't. Unless it points to the root or current
directory.
Post by Harry Potter
Also, how do I convert it to a full path?
Combine it with the current directory path.

Loading...