As a test, I did a reading of my C drive from Powerbasic, which yielded filenames such as:
Kentuc~1,txt
Indian~1.txt
Indian~2.txt
and so on. I have a routine which will look for those names and return the long file name.
A problem surfaced today. What if the name "Robert~1.txt" is actually the full name? Because of the "~" character, my routine keeps attempting to obtain the long file name of this. Does anyone know how to obtain a file name and also along with it a indicator of some sort to show if it is the Full name or short name? That way, if it is the short name, I can obtain the full name, if it is already the full name, go to the next name?
It hangs here, I have set to keep trying until it gets the long file name. Any suggestions? Would it work to just try to get the LFN only once, and if that fails, assume the "~" is part of the name and that it is the complete name?
Thank you.
Robert
[This message has been edited by Robert E. Carneal (edited February 18, 2005).]
Kentuc~1,txt
Indian~1.txt
Indian~2.txt
and so on. I have a routine which will look for those names and return the long file name.
A problem surfaced today. What if the name "Robert~1.txt" is actually the full name? Because of the "~" character, my routine keeps attempting to obtain the long file name of this. Does anyone know how to obtain a file name and also along with it a indicator of some sort to show if it is the Full name or short name? That way, if it is the short name, I can obtain the full name, if it is already the full name, go to the next name?
It hangs here, I have set to keep trying until it gets the long file name. Any suggestions? Would it work to just try to get the LFN only once, and if that fails, assume the "~" is part of the name and that it is the complete name?
Thank you.
Robert
[This message has been edited by Robert E. Carneal (edited February 18, 2005).]
Comment