CLEAR lcDir = [C:\Documents and Settings\Administrator\] loShell = CreateObject("Shell.Application") loFolder = loShell.Namespace( lcDir ) For Each lcFileName in loFolder.Items *-------------------------------------------------- *-- get alternate name *-------------------------------------------------- lcAltName = loFolder.GetDetailsOf(lcFileName, 0) lcAltName = STRTRAN(lcAltName,'Shared Documents', 'Documents') lcAltName = STRTRAN(lcAltName,'Shared Music', 'My Music') lcAltName = STRTRAN(lcAltName,'Shared Pictures', 'My Pictures') lcAltName = STRTRAN(lcAltName,'Shared Video', 'My Videos') lnBegPos = AT(['s],lcAltName) IF lnBegPos > 0 AND INLIST( ALLTRIM(SUBSTR(lcAltName,lnBegPos + 3, 254)),'Documents','Music','Pictures','Videos') lcAltName = ALLTRIM( 'My ' + SUBSTR(lcAltName,lnBegPos + 3, 254)) ENDIF *-------------------------------------------------- lcFullPath = lcDir + lcAltName if !directory(lcFullPath,1) ?'Dir not found: ' + lcFullPath *!* FOR t= 0 TO 34 *!* ? "File name "+STR(t,2)+": "+ loFolder.GetDetailsOf(lcFileName, t) *!* next ELSE ?' found: ' + lcFullPath ENDIF NEXT>my bad, here is the correct sample
>CLEAR > >lcDir = [C:\Documents and Settings\Administrator\] > >loShell = CreateObject("Shell.Application") >loFolder = loShell.Namespace( lcDir ) > >For Each lcFileName in loFolder.Items > > lcName = loFolder.GetDetailsOf(lcFileName, 0) > lcFullPath = lcDir + lcName > > if !directory(lcFullPath) > ?'Dir not found: ' + lcFullPath > ELSE > ?' found: ' + lcFullPath > ENDIF > >NEXT >>>Mike,
>>>CLEAR >>> >>>lcDir = [C:\Documents and Settings\Administrator\My Documents\] >>> >>>loShell = CreateObject("Shell.Application") >>>loFolder = loShell.Namespace( lcDir ) >>> >>>For Each lcFileName in loFolder.Items >>> lcDirName = loFolder.GetDetailsOf(lcFileName, 0) >> lcDirName = addbs(lcDir ) + loFolder.GetDetailsOf(lcFileName, 0) >>> if !directory(lcDirName) >>> ?'Dir not found: ' + lcDirName >>> ENDIF >>>NEXT >>>