The easiest would probably be to fire a DIR command from your application:
DIR SpecificDir\*.* /ON > specdir.txt // Order by Name
DIR OtherDir\*.* /ON > otherdir.txt
Then read the TXT files and compare the filenames after extracting it
from lines.
Since I am not a VFP but a Clipper/VO/X# developer hopefully this will
give you an idea how to do it using the VFP language syntax in X#.
LOCAL aSpecDirFiles, aOtherDirFiles AS STRING[]
LOCAL aMissing = ArrayNew() AS ARRAY
aSpecDirFiles = FileToStr("specdir.txt").Split(CR_LF)
aOtherDirFiles = FileToStr("otherdir.txt").Split(CR_LF)
LOCAL nPos = 1 AS INT
FOREACH line AS STRING IN aSpecDirFiles
SpecFile = SubStr(line, <start>, <end>)
OtherFile = SubStr(aOtherDirFiles[nPos], <start>, <end>)
DO WHILE OtherFile < SpecFile
AAdd(aMissing, OtherFile)
nPos = nPos + 1
OtherFile = SubStr(aOtherDirFiles[nPos], <start>, <end>)
ENDDO
IF OtherFile = SpecFile && We have a match
nPos = nPos + 1
ENDIF
NEXT
FOR i = nPos UPTO aOtherFiles.Length
AAdd(aMissing, SubStr(aOtherDirFiles[i], <start>, <end>))
NEXT
Hope this helps.
On 2019/08/13 10:08, Charles Hart Enzer, M.D. wrote:
I need a Search String:
- All Documents in OTHER DIRECTORIES
- That are NOT in a SPECIFIC DIRECTORY
Thank you.
*Shai / שי **Charles Hart Enzer, MD(Ohio, USA), FAACAP*
*Aliyah <https://en.wikipedia.org/wiki/Aliyah>: Cincinnati to Jerusalem
<http://www.gojerusalem.com/items/263/German-Colony/>'s German Colony
<https://en.wikipedia.org/wiki/German_Colony,_Jerusalem> May, 2017*
*Volunteer Associate Professor of PsychiatryUniversity of Cincinnati
Medical CenterWebSite: **EnzerMD.com <http://EnzerMD.com>*
*Publications* <http://www.enzermd.com/CV.html#Publications>
*Tiny Country, Huge Dreams*
*ארץ זעירה, **חלומות ענקיים*
*עם ישראל חי*
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message:
https://leafe.com/archives/byMID/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.