Craig,
You might consider using one of the scripts found on
this macscripter.net thread. As the thread is old and may not render well in your browser, I've reproduced the scripts below.Thanks to Rob and Jonn8 respectively.
+Rob's Script:+
*set output_ to (choose file name with prompt "Choose a name and location for the new file.")*
*set folder_ to (choose folder with prompt "Select the folder containing the files whose names should be collected.")*
*tell application "Finder" to set files_ to files of folder_ as alias list*
*set names_ to ""*
*repeat with file_ in files_*
*set names_ to names_ & ((name of (info for file_) & return))*
*end repeat*
try
*set file_ref to open for access output_ with write permission*
*write names_ to file_ref starting at eof*
try
*close access file_ref*
*end try*
*on error e*
*display dialog e*
try
*close access file_ref*
*end try*
*end try*
+Jonn8's Script:+
*set folder_list to list folder of (choose folder with prompt "Select a folder:") without invisibles*
*tell (a reference to my text item delimiters)*
*set {old_delim, contents} to {contents, return}*
*set {folder_list, contents} to {"" & folder_list, old_delim}*
*end tell*
*do shell script "echo " & (quoted form of folder_list) & " > " & (quoted form of POSIX path of (choose file name with prompt "Save the file name list as:" default name "files.txt"))*
With either script, copy the block of code in bold and paste it into your AppleScript Script Editor. Choose File > Save As > File Format: script, to be run from the Scripts Menu; or File > Save As > File Format: application, to be run from the Dock, or wherever.
Either script will present you with a choose folder dialog as well as an opportunity to name a new text file. This new text file will contain the names of the items within the chosen folder, either file names only (Rob's script), or both file and folder names (Jonn8's script).
From there it's a matter of copy-and-pasting the list of names to a new mail message, or simply attaching the text file to the new mail message.
Just an idea for you... Good luck!
Regards, Andrew99