on open dorp_Items
tell application "Finder"
--set theFolder to (folder "demofile" of desktop) as alias
set theFolder to (item 1 of dorp_Items) as alias
set pPath to POSIX path of theFolder as string
end tell
set kensafile_count to do shell script "ls -1 " & pPath & " | wc -l"
set ayamari_fairumei to ""
try
set ayamari_fairumei to do shell script "ls -1 " & pPath & " | grep -v '[1-9][1-9][1-9][A-Z][1-9][1-9][0-9].pdf'"
on error e
if (e = "0 以外の状況でコマンドが終了しました。") then
set ayamari_count to 0
end if
end try
set ayamari_count to count of paragraph of ayamari_fairumei
if ayamari_count = 0 then
tell application "Finder"
set label index of theFolder to 6
end tell
display dialog "検査フォルダ:" & return & tab & pPath & return & "検査ファイル総数:" & return & kensafile_count & return & "誤りファイル数:" & return & tab & ayamari_count & return & return & "ファイル名に誤りはありませんでした。" buttons {"OK"}
else
repeat with i from 1 to ayamari_count
set ayamaru_list to paragraph i of ayamari_fairumei
tell application "Finder"
set label index of (file ayamaru_list of theFolder) to 2
end tell
end repeat
tell application "Finder"
set label index of theFolder to 2
end tell
display dialog "検査フォルダ:" & return & tab & pPath & return & "検査ファイル総数:" & return & kensafile_count & return & "誤りファイル数:" & return & tab & ayamari_count & return & return & ayamari_fairumei buttons {"OK"}
display dialog "ファイル名を速やかに修正して下さい" buttons {"OK"} with icon stop
end if
end open
最新の画像[もっと見る]
-
戻りフォーム 9年前
-
戻りフォーム 9年前
-
VBA入力フォーム 10年前
-
2016.2.7-3 10年前
-
2016.2.7-3 10年前
-
2016.2.7-3 10年前
-
2016.2.7-3 10年前
-
2016.2.7-3 10年前
-
2016.2.7-3 10年前
-
2016.2.7-3 10年前
※コメント投稿者のブログIDはブログ作成者のみに通知されます