Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Force Extension 1

Status
Not open for further replies.

IlyaRabyy

Programmer
Nov 9, 2010
571
US
Colleagues,

the VFP has function FORCEEXT(cFile). For instance:
- You have a file, say, cFile = "C:\Test\MyFile.TXT"...
- ... and there also should be file C:\Test\MyFile.XML
- You can check the presence of that latter file by

Code:
IF FILE(FORCEEXT(cFile, "XML")
...
ENDIF

Essentially, this VFP function does exactly what it's name suggests: forced the file's extension to change to the given one. And my question is:

Is there any equivalent of this (very helpful) function in VB .NET? Or it's "roll 'er own, pal"?

(I tried to find similar method in the File, Path and even Directory classes - nada!)

TIA!

Regards,

Ilya
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top