I have what I thought would be a simple problem to script, but I’m stumped and could use some help.
I have a directory of 0 byte files (a dummy list of files) that I need to add a little “something” to so that they are not 0 byte files any more.
I am trying the following code but it does not write to the files.
set sourcefolder to choose folder
tell application "Finder" to set workFiles to sourcefolder
repeat with currentFile in workFiles
set ff to (open for access file currentFile with write permission)
try
set eof ff to 0
write "Text" to ff
end try
close access ff
end repeat
Any help would be GREATLY appreciated!
Thanks!
Tom