himanshu
11-22-2010, 04:22 AM
--I have a list of files have extension *.txt, I m getting list by shell script, and I have hard coded file list in string array...I am comparing both and want files are not there getting in shell script..the script logic is correct..but getting hanged..I try to show o/p as not contain files
-- I will modify same script to get only file name and trim path...I do not want to hard code path in string array and also in shell script
set fileList to {}
set qtypefile to quoted form of ".txt"
set returnFiles to paragraphs of (do shell script "mdfind -onlyin / " & qtypefile)
--return choose from list returnFiles
set myNewList to ""
set myNotList to {"path1/1.txt",path1/2.txt",path1/3.txt" }
tell application "Finder"
repeat with i in myNotList
repeat until i contains returnFiles
if i is not in returnFiles then
return choose from list returnFiles
end if
end repeat
end repeat
end tell
-- I will modify same script to get only file name and trim path...I do not want to hard code path in string array and also in shell script
set fileList to {}
set qtypefile to quoted form of ".txt"
set returnFiles to paragraphs of (do shell script "mdfind -onlyin / " & qtypefile)
--return choose from list returnFiles
set myNewList to ""
set myNotList to {"path1/1.txt",path1/2.txt",path1/3.txt" }
tell application "Finder"
repeat with i in myNotList
repeat until i contains returnFiles
if i is not in returnFiles then
return choose from list returnFiles
end if
end repeat
end repeat
end tell