still puzzled howto exclude hidden files....

Hi Nigel,

It works!!! happy me :slight_smile:
thanks a lot!!

i have two more thing
if no file is found can i get that result in a log on the desktop (with name not found)
if the list to choose from is empty can i get a dialog " no files found"
like:
if (empty list)
then dialog alert)
else (list dialog and choose)

also need to dive into de progress part, its an old version and i’ve read that the applescript version of 10.10 includes a progress…

property theSDirectory : "/Volumes"
property noSearch : "/Volumes/Macintosh HD"


set theVideos to text returned of (display dialog "name starts with..?" default answer "" buttons {"ok", "cancel"} cancel button "cancel" default button 1)

set oldDels to AppleScript's text item delimiters
set AppleScript's text item delimiters to ","
set theVideolist to every text item of theVideos
set AppleScript's text item delimiters to "|"
set theVideolist to theVideolist as string
set AppleScript's text item delimiters to oldDels
set theLog to (do shell script "touch " & "~/Desktop/notFound.txt ")
set regex to theSDirectory & "/[^\\.].*(" & theVideolist & ").*"

--set master_list to paragraphs of (do shell script "/usr/bin/find -E " & quoted form of theSDirectory & " -path " & quoted form of --noSearch & " -prune " & " -o " & " -iregex " & quoted form of regex & " -print ")

set master_list to paragraphs of (do shell script "/usr/bin/find -E " & quoted form of theSDirectory & " -type f ! -name '.*' ! -path " & quoted form of (noSearch & "*") & " -iregex " & quoted form of regex)

set selected to choose from list master_list ¬
	with prompt "Please select:" with multiple selections allowed
set listSize to (count of selected) as string
if selected is false then return

set Destination to choose folder with prompt "Choose your Destination:"

set loopCount to "0" as number

set ProgressBar to load script alias (((path to scripts folder) as text) & "Lib:BP Progress Bar Controller.scpt")
tell ProgressBar
	initialize("copy selected videos")
	barberPole(true)
	setStatusTop to "copying..."
	repeat with aPath in selected
		set AppleScript's text item delimiters to "/"
		set filename to last text item of aPath
		set AppleScript's text item delimiters to ""
		set loopCount to ((loopCount) + 1)
		setMax to listSize
		setStatusTop to "moving: " & filename & " --> " & quoted form of (POSIX path of Destination)
		setStatusBottom to "Number of Items: " & loopCount & " of " & listSize
		do shell script "/bin/cp " & quoted form of aPath & space & quoted form of (POSIX path of Destination)
		increase by 1
	end repeat
	tell ProgressBar to quit
	display dialog "Videos are copied" buttons {"OK"} default button 1
	do shell script "open " & quoted form of (POSIX path of Destination)
end tell