Hi, this is my first post here, so I hope i’m not being redundant (I am also VERY new to applescript).
I need to copy file name(s) to the clipboard with automator without the path.
I have used the “Get Folder Contents” command, but I get the whole path when its pasted to TextEdit.
I have successfully used this modified applescript from one that I found here previously:
set f to (choose folder)
tell application "Finder" to set e to name of items of f
if e = {} then
beep
display dialog "No items found in the folder "" & f & ""." buttons {"Cancel"} default button 1 with icon 0 giving up after 10
else
set filelist to {}
repeat with i from 1 to (count e)
set end of filelist to ("" & e's item i & ", " & return)
end repeat
set the clipboard to "" & filelist
beep 2
end if
But this uses a choose folder command. Ideally I could use this same applescript in line with automator if I knew how to make this receive the folder from the previous step instead of the choose folder command.
any help appreciated
thanks
Daniel