On Mar 29, 2013, at 8:14 PM, MikeC <mi...@caseyspm.com> wrote: > I seldom use BB Edit so I am a novice. > > Would someone please provide code for placing .jpg at the end of hundreds of > file names in a single folder. > > Example: Folder A contains files: > ATH01 > ATH02 > ATH03 > BKJ01 > and so on.
This isn't really a job for BBEdit, which works on the contents of files, not on file names or directory contents. However, it's an ideal application for Automator. Start Automator. It should ask you what you want to create. (If it doesn't, type Cmd-N.) Make sure the Actions option is selected in the top left of the Automator window. Click Files&Folders in the left column, and a list of Finder actions will appear in the second If this is a one-off task: Drag the folder you want to operate on into the right-side pane, and a "Get Specified Finder Items" action will appear with your folder in it. (The output of this action is the folder.) Drag the "Get Folder Contents" action under it. (This takes the folder as its input, and its output is all the files in the folder.) Drag the "Rename Finder Items" action under it. (This takes the collection of files as its input, and renames each of them. Its output is the same set of files, but you aren't going to use the output.) In the Rename action box, choose "Add Text" from the top dropdown menu. In the "Add:" field, type ".jpg". Choose "As extension" from the dropdown menu to the right. Now you can just click the Run button in the toolbar, and you're done. To create a reusable workflow, change the first step. Instead of dragging the folder into the workflow, drag the "Ask for Finder Items" action from the second column. After you've added all three actions to the workflow, save it. Now you can run it just like any program; when it runs, it will put up a dialog box that will let you choose the folder. Have fun, Neil Faiman -- -- You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at <http://groups.google.com/group/bbedit?hl=en> If you have a feature request or would like to report a problem, please email "supp...@barebones.com" rather than posting to the group. Follow @bbedit on Twitter: <http://www.twitter.com/bbedit> --- You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.