Hi there I need an apple script that will allow me to select a source folder and then take selection and run a termianl command on it.
At the moment I have
set sourcefolder to (choose folder with prompt "Please choose a source folder" without multiple selections allowed and invisibles)
set command to "find sourcefolder"
now that is not right, but I can’t figure out what I need to put into the first bit of the script to allow me to use it in the second bit.
set sourcefolder to (choose folder with prompt "Please choose a source folder" without multiple selections allowed and invisibles)
set qsourcefolder to quoted form of (POSIX path of sourcefolder)
set thecommand to "find " & qsourcefolder
do shell script thecommand
set sourcefolder to (choose folder with prompt "Please choose a source folder")
set searchTerm to text returned of (display dialog "enter file name" default answer "")
set qsourcefolder to quoted form of (POSIX path of sourcefolder)
set thecommand to "find " & qsourcefolder & " -iname " & quoted form of searchTerm
do shell script thecommand
@chris: without multiple selections allowed and without invisibles is the default parameter of choose folder