Add create.multiple.missing.files.scpt
This commit is contained in:
parent
2f658420eb
commit
8f57723b56
22
create.multiple.missing.files.scpt
Normal file
22
create.multiple.missing.files.scpt
Normal 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
|
||||||
Loading…
x
Reference in New Issue
Block a user