Add create.multiple.missing.files.scpt

This commit is contained in:
thanhtl 2025-11-27 17:30:39 +07:00
parent 2f658420eb
commit 8f57723b56

View File

@ -0,0 +1,22 @@
set baseDate to "20250102_"
set deptCode to "-KHCN_Missing"
-- Choose folder to create files
set targetFolder to choose folder with prompt "Select a folder to create the Missing files:"
repeat with n from 4121 to 4210
set fileName to baseDate & n & deptCode & ".txt"
set filePath to (targetFolder as text) & fileName
-- Create empty file
try
set f to open for access file filePath with write permission
close access f
on error
try
close access file filePath
end try
end try
end repeat
display dialog "Done! Files created from 2731 to 2779." buttons {"OK"} default button 1