AppleScript - Paste a file in every folder and sub folder of directory -
i have directory sub directories. want put file in every folder, without use of sudo commands. want use apple script code , terminal commands, using command line:
do shell script "" the file called hello.png
i'd love help! :) thank all!
the copy done in sub folders of main folder (what ever recursive level is.
the script bellow want :
set myfile choose file prompt "select file duplicated in every folder" set myfolder choose folder prompt "select folder in want copy file" tell application "finder" set subfolders every folder of entire contents of myfolder repeat afolder in subfolders duplicate myfile afolder end repeat end tell i made assumption want duplicate selected file sub-folders of selected folder. then, did not add recursive search sub-folders of sub-folders of ...
in script, used applescript commands. can replace "duplicate" line shell script command (using shell command 'cp'). in case script must use posix path , quoted form...which more complex simple finder duplicate instruction !
Comments
Post a Comment