Try this:<br><br><FONT FACE=monospace>* GetShortPathName<br><br>PROCEDURE GetDOS83<br>LPARAMETERS tcLongPathName<br><br>* Accepts a path as a parameter. <br>* If the path is invalid or missing then GetFile gets one<br>* If you need a UI interface out of this then remove it<br><br>LOCAL lcLongFile, lcBuffer, lnBufferSize, lnShortPathLen, lcShortPath<br><br>* Validate parameter<br>IF EMPTY(tcLongPathName) OR ;<br> VARTYPE(tcLongPathName) <> 'C' OR ;<br> !FILE(tcLongPathName)<br> lcLongFile = GETFILE()<br> IF !FILE(lcLongFile)<br> * user cancelled or again entered invalid stuff<br> RETURN && Loser!<br> ENDIF<br>ELSE<br> * the path is valid<br> lcLongFile = tcLongPathName<br>ENDIF<br><br>DECLARE INTEGER GetShortPathName IN Win32API ;<br> STRING @cLongPath, ;<br> STRING @cShortPathBuff, ;<br> INTEGER nBuffSize<br><br>lcBuffer = SPACE(511)<br>* should this be set to the maximum length allowed for a long path name?<br>lnBufferSize = 511<br>lnShortPathLen = GetShortPathName(lcLongFile, @lcBuffer, @lnBufferSize)<br>lcShortPath = LEFT(lcBuffer, lnShortPathLen)<br>RETURN lcShortPath</font> <p>John Durbin<br><a href=mailto: > </a><br><a href= > </a><br>ICQ VFP ActiveList #73897253