질문이 있습니다. 기본적으로 AppleScript로 "application"을 썼는데, 뭔가 의심 스럽습니다.Q : Applescript - 폴더에있는 모든 파일을 전달하지 않습니다.
tell application "Finder"
activate
set theXMLFolder to choose folder with prompt "ok"
set numberOfFiles to count of (files in folder theXMLFolder)
repeat with a from 1 to numberOfFiles
set theXMLFile to item a of theXMLFolder
if name extension of theXMLFile is in validExtensions then
my resetVariables()
my importXMLFolder(theXMLFile as string) -- import and read XML file
my writeToExcel() -- convert XML to Excel file
end if
end repeat
end tell
이것은 폴더 안에 XML 파일을 묻는 메시지입니다. 문제는 폴더에 XML 파일 만 있으면 완벽하게 작동하지만 순간에는 다른 파일이있을 수 있습니다. 가끔은 모든 파일을 읽을 수없는 경우가 있습니다. 9 개의 파일 중 7 개만 찾습니다. 항상 모든 파일을 볼 수있는 방법이 있습니까? 감사합니다