Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Apps and Programs
Applescript to Copy from Clipboard to Terminal
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="kspin" data-source="post: 959845" data-attributes="member: 135139"><p>Thanks nabl! Yes, I am trying to get a list of all of the files and folders within the folder dropped onto the application.</p><p></p><p>This worked perfectly to grab the top level of the folders within the folder I wanted it to list. So now, my issue is getting it to list everything within those initial folders...</p><p></p><p>I tried using this:</p><p></p><p>[CODE]on open dropped_item</p><p> </p><p> get the POSIX path of dropped_item</p><p> </p><p> do shell script "ls */* " & the quoted form of result & " > ~/Desktop/filelist.txt"</p><p> </p><p>end open[/CODE]</p><p></p><p>But am getting error messages that read:</p><p>ls: broadcasthost: Operation timed out</p><p>ls: localhost: Operation timed out</p><p>ls: agentx: Permission denied</p><p>ls: backups: Permission denied</p><p>ls: root: Permission denied</p><p></p><p>The command line "ls */* | cat>>~/Desktop/filelist.txt" works fine in the shell every time and gets me what I want, so I'm not quite sure what those errors are relating to.</p><p></p><p>Is there another way to generate all of the file within the subfolders of the dropped folder?</p><p></p><p>Thanks again so much, this is big help so far!</p></blockquote><p></p>
[QUOTE="kspin, post: 959845, member: 135139"] Thanks nabl! Yes, I am trying to get a list of all of the files and folders within the folder dropped onto the application. This worked perfectly to grab the top level of the folders within the folder I wanted it to list. So now, my issue is getting it to list everything within those initial folders... I tried using this: [CODE]on open dropped_item get the POSIX path of dropped_item do shell script "ls */* " & the quoted form of result & " > ~/Desktop/filelist.txt" end open[/CODE] But am getting error messages that read: ls: broadcasthost: Operation timed out ls: localhost: Operation timed out ls: agentx: Permission denied ls: backups: Permission denied ls: root: Permission denied The command line "ls */* | cat>>~/Desktop/filelist.txt" works fine in the shell every time and gets me what I want, so I'm not quite sure what those errors are relating to. Is there another way to generate all of the file within the subfolders of the dropped folder? Thanks again so much, this is big help so far! [/QUOTE]
Verification
Name this item 🌈
Post reply
Forums
Apple Computing Products:
macOS - Apps and Programs
Applescript to Copy from Clipboard to Terminal
Top