Hallo!
Ich habe mich nun dazu entschlossen meine privaten Dokumente anstatt im Filesystem zu halten und nur in eine DTPO-Datebank zu verlinken vollständig in eine Datenbank zu schieben.
Bisher habe ich ein Folder-Script im Finder genutzt, um bei bestimmten PDF-Dateien das PDF-Passwort zu entfernen. Habe hierzu ein Script gebaut, das mit PDFTK arbeitet.
Nachdem ich jetzt diese Folder-Scripts in der Datenbank nicht mehr nutzen kann, kann mir jemand helfen dieses Script umzubauen?
----```
on adding folder items to theFolder after receiving theItems
-- enter your values here
set pdftkPosixPath to "/usr/local/bin/pdftk"
set pWord to "passowrd"
set appendedName to "_unlocked" -- text to append to the file name
set shouldTrash to true -- true or false, move the locked file to the trash after unlocking?
set fContainer to theFolder as text
repeat with anItem in theItems
try
tell application "System Events"
set fName to name of anItem
set fExt to name extension of anItem
end tell
if fExt is "pdf" and fName does not contain appendedName then
set baseName to (text 1 thru -5 of fName) & appendedName & ".pdf"
set newPath to fContainer & baseName
do shell script (quoted form of pdftkPosixPath & space & quoted form of POSIX path of anItem & " input_pw " & quoted form of pWord & " output " & quoted form of POSIX path of newPath)
if shouldTrash then
tell application "Finder" to move anItem to trash
end if
end if
end try
end repeat
end adding folder items to
----
Wäre echt super - Danke und liebe Grüße
Stefan