Hi this is an older working script someone was kind enough to post; but it returns an error for me that says:
“Can’t get folders of alias” in the line.
Can you help me so I can run this?
I want to cobble my nested quark docs to one
folder.
thx.-br
global myPass
global dPath
property passQ : "What is the admin password?"
set myPass to text returned of (display dialog passQ default answer "")
tell application "Finder"
set chosenFolder to choose folder
my folderprocess(chosenFolder)
end tell
do shell script "/bin/rm -rf /tmp/myTouch" password myPass with administrator privileges
display dialog "Your files and folders have been \"touch\"ed"
on folderprocess(chosenFolder)
set theTmp to "/tmp/myTouch"
set currFolder to chosenFolder as alias
set myTouch to "/usr/bin/touch " & quoted form of POSIX path of currFolder
do shell script "/bin/echo" & space & quoted form of myTouch & space & ">" & theTmp password myPass with administrator privileges
set doMyTouch to "/bin/sh" & space & theTmp
do shell script doMyTouch password myPass with administrator privileges
tell application "Finder"
set myFiles to every file of chosenFolder
if (count of myFiles) ≠0 then
my finderprocess(myFiles)
end if
set subFolders to folders of chosenFolder
if (count of subFolders) ≠0 then
repeat with thisFolder in subFolders
my folderprocess(thisFolder)
end repeat
end if
end tell
end folderprocess
on finderprocess(myFiles)
set theTmp to "/tmp/myTouch"
repeat with thisfile in myFiles
set currFile to thisfile as alias
set myTouch to "/usr/bin/touch " & quoted form of POSIX path of currFile
do shell script "/bin/echo" & space & quoted form of myTouch & space & ">" & theTmp password myPass with administrator privileges
set doMyTouch to "/bin/sh" & space & theTmp
do shell script doMyTouch password myPass with administrator privileges
end repeat
end finderprocess
Model: g4 silver 867 mhz
AppleScript: 1.9.3 v.43
Browser: Firefox 2.0.0.6
Operating System: Mac OS X (10.3.9)