OS X Technologies :: Apple-script: Prepend A String With Folder Name?
May 23, 2012
I’ve found this script that copies the names of multiple selected files in the Finder to clipboard: try set theNames to {} tell application "Finder" repeat with i in (get selection) set end of theNames to name of i end repeat end tell set {TID, text item delimiters} to {text item delimiters, return} set the clipboard to theNames as text set text item delimiters to TIDend try I need to prepend to each result a string like [URL] where “folder” is the parent folder relative to the files.
View 1 Replies
ADVERTISEMENT
Jun 24, 2012
Would there be a script I can run in Apple Script Editor that changes several folder icons inside another folder all at once?
View 14 Replies
View Related
Jul 3, 2012
I have a folder with mulitple subfolders. Each one has a different number of files in it. I want to use Automator or Applscript to summarize the contents into a text file or email:
folder 1 name / number of items
folder 2 name / number of items
folfder 3 name / number of items
etc.
Info:
Mac Pro, Mac OS X (10.6.4)
View 4 Replies
View Related
Jun 11, 2012
I am creating 2 AppleScripts to automate mounting Windows shared drives on Lion Macbook Airs. The first creates an alias on the user's desktop to the user's shared drive. This is functional and doing what I want it to do. The 2nd script attempts to create a favorite to the alias in Finder's sidebar. Unfortunately, I can't seem to get this script to work.
I am attempting to create an alias on a user's desktop to a folder in a Windows network share.Here is my applescript: set user_name to (short user name of (system info))tell application "Finder" activate set myFolder to ((home as text) & "Desktop:" & user_name)select myFolder tell application "System Events" keystroke "t" using command down end tellend tell The script runs, Finder opens to the user's folder, but nothing is added to the side.
View 1 Replies
View Related
Apr 20, 2012
What versions of Mac OS X has an Applications folder inside the users folder?
View 1 Replies
View Related
Mar 7, 2012
Does any one know of a bug or a log for folder scripts that do not run? I am trying to get a basic folder script (to replace %20 in the file name) of the Downloads folder.
When downloading multiple files (two or more) it runs only on the first file, successfully without error, and then never runs on the second file. If I move both of the files out of the Downloads folder and move it back it, the one file that does not get the folder action now does and everything is peachy.So it is not that the folder action is not scripted properly. It is just that the folder does not catch the second file download - guess maybe too fast? Has any one seen this or have this bug?
Info:15" Unibody MacBook Pro , Mac OS X (10.6.4)
View 13 Replies
View Related
Apr 14, 2012
I'm new to ApplesScripting. I've found this script that I'd like to change:--This script will make a new folder on the desktop with current date and dialog box--format the date to 2010-11-19tell (current date) to get day & (it's month as integer) & (it's year as integer)set TheDateFormat to the result as text-- asks for folder name with date as default answerset TheFolderName to text returned of (display dialog "Name the folder" default answer TheDateFormat)--make folder with date & user entered texttell application "Finder" make new folder with properties {name:TheFolderName}end tellThe desired changes:- Date format should be: 150412 + a letter (a, b, c) if the folder to be created already exists.- Place the cursor at the start of name dialog, no selection active.- The new folders should be created in /Users/Hans/Dropbox/Jobs/Another question is related to execution of the script:- How can I start the script easily with a shortcut key or a Dock icon?- Is it possible to select client name from a plain text file containing client names in separate lines?- Is it possible to have zip files automatically unzipped to subfolder names with the zip package name?- Regarding the Dock icon I could even imagine that I drag a zip or other file from an email or the Desktop to the icon and that I only have to type the clients name to have the file moved to a new folder. user entered texttell application
View 1 Replies
View Related
May 10, 2012
Our environment has multiple Windows file servers, both 2003 and 2008. If one of these SMB shares is accessed from a Mac and the user creates a folder, will the ACLs on the share that are set to cascade actually cascade to this newly created folder? We've had issues in the past where ACLs that are supposedly set to cascade on a shared folder are not present on sub-folders created from Macs.Next question: if the share resides on a netapp device, do the same rules apply? The Macs are still connecting to these shared folders using the SMB protocol.All Macs are bound to our 2008 AD domain and use network accounts with local homefolders. The issue seems to happen when one or both of the following things happen:
1. A Mac user copies/creates a folder on a Netapp share and for some reason it doesn't inherit rights correctly
2. We move the folder from one share on an actual Windows server to the Netapp and it doesn't take permissions correctly.
Info:
MacPro 2x2.66GHz Dual Core Xeon, 4GB RAM,, Mac OS X (10.6.8)
View 2 Replies
View Related
Feb 28, 2012
I followed the instructions, but now I do not see any calendars to sync or any mail accounts to sync in the Info section of iTunes.
Info:
MacBookPro, Mac OS X (10.7.2)
View 1 Replies
View Related
Mar 7, 2012
Im trying to run an rsync command which copies a backup of a server services folder using a remote computer. The backup folder of services resides on the main system disk.
AR-ADL-MBP1-John:~ john$ sudo rsync -va -e --delete ssh admin@10.105.141.66:/Volumes/Server HD_mail/Data Store Backups /Volumes/ARINA temp
errors out with building file list ... rsync: link_stat "/Users/john/ssh" failed: No such file or directory (2) rsync: link_stat "/Users/john/admin@mail.arina.biz/Volumes/Server HD_mail/Data Store Backups" failed: No such file or directory (2)
I've also tried to open the server in finder and run the rsync without ssh. This works for non system disks but get permissions errors on this system disk rsync: readdir("/Volumes/Server HD_mail/Data Store Backups/M-W-F/Data_Stores/mail/259F2CAC-D0EB-4348-B85F-1257F8242E87"): Permission denied (13)
View 8 Replies
View Related
Mar 14, 2012
How can i open the files in the folder if you scroll to "--open file items of the name folder" you can see where I am struggling to run the script.How should this look to run, currently the script runs, with no errors or anything appearing in the folders.
[code]...
View 11 Replies
View Related
Mar 30, 2012
I am running OS 10.6.8, using Automator to create a Folder Action. The input is a single folder containing 2 or more PDF files. I drop this folder onto the folder with the action attached. All of the PDFs are combined and the resulting PDF is copied to a new location.
It works very well with one problem. The name of the combined PDF is an automatically generated system name. I would like this PDF file name to change to the name of the original folder that contained the original PDFs.
To summarize: "Folder A" has the action attached. "Folder B" contains 2 or more PDFs. I drop Folder B onto Folder A. Automator creates a new combined PDF. I would like this to be named "Folder B.pdf"
Info:
Mac Pro, Mac OS X (10.6.8)
View 2 Replies
View Related
May 17, 2012
I need to move one or more files inside a folder to another folder.
View 4 Replies
View Related
May 29, 2012
I have a folder action set up to open movie files in a conversion app but every time I add a new file it loads all the files in the folder. How can i exclude a file that has already been opened by the folder action. I can't move the file due to queing up moves for conversion if the file is moved after it is opened the the program doesn't know where to look for it. Ive tried Filter finder items by last opened and set it as today but that did not work. It opened nothing. May I could set it up to know if the file has been there longer then 5 min that the folder action should not open it.
Info:
Mac Pro, Mac OS X (10.7.3)
View 14 Replies
View Related
Aug 7, 2012
I want to create a Folder Action to run the following shell script on all files with extension .vcs:
sed '1d' >reminder.ics
The job of the Folder Action is to take any Calendar item files downloaded from TVGuide.co.uk, remove the first line and then save them as .ics files. The reason for this is that the files are automatically generated with a carriage return on the first line, which BusyCal (being strict about these things) doesn't like. It then rejects the whole file.
I have tried doing this with Automator but the result didn't work.
If it's possible to have the Folder Action retain the original file name (ie. everything pre-extension) that'd be a bonus.
Info:
Mac mini (Mid 2011), Mac OS X (10.7.4)
View 4 Replies
View Related
Jun 27, 2012
if there is a way of having a list of image file names, searching for the images then putting them into a new folder? I'm guessing it can probably be done through mac scripting but I know nothing about scripting and genreally not great with technogy so ideally need step by step instructions!
View 6 Replies
View Related
Mar 13, 2012
I have thousands of music projects with a somewhat fixed folder hierarchy and I'm trying to first rename and then extract (move) certain files from their original location.
Here is the most common example of the hierarchy: ProjectName/Info/Setups/fixed name file (either a pdf, txt or jpg)
My goal is to have these files renamed after their parent folders, all the way up to the Project Name and then have them moved to a set folder, out of this dull dictatorship I've created, so my files would end up with a name like this: ProjectName - Info - Setups - fixed name file
Info:
iMac 20'', Mac OS X (10.6.8)
View 2 Replies
View Related
May 16, 2012
I'm trying to write a script that will open a specific folder. The only problem is that it needs to be run on multiple machines with different Hard Drive names. Here is a sample of the script that will work on my machine.
tell application "Finder" activate open folder "HDD:Volumes:USERData:Users:Staff:Name" end tell
Is there anyway to change "HDD" to whatever the current users Hard Drive is named?
View 2 Replies
View Related
May 23, 2012
I need to collect my students home workn which includes images, small film clips and text:
I use a FileMaker database
I have a FM script which
1 - copies the student ID
2 - opens the URL where the message is located
3 - I added this applescript I found here:
[code]...
Info:Mac Pro, Mac OS X (10.6.8)
View 6 Replies
View Related
May 29, 2012
Does anyone have some experience running multiple folder actions at the same time?I've written a Applescript folder action that processes some files. When adding some files, the script starts and all goes well. The processing of each file takes a few minutes, but all files are processed correctly.However, when adding some new files to the dropfolder, while the folder action is all ready processing other files dropped a few minutes earlier, the process that is all ready running immediately aborts and the folder action is relaunched on the new files, leaving the old files for what they are.The same problem occurs with multiple folders, each having a folder action attached. When dropping files in "Folder A", the script starts processing. But if someone droppes files in "Folder B", The script of folder A aborts, and the script of folder B starts processing. When adding more files to the folders, the result is the same. In some casses, when the last dropped files are processed, the os continues where the operation was aborted on the previous files. But this not always happens. To make things worse, when you remove the items from the folders afterwords, the folder actions starts running again on items no longer present in the folder ..Does anyone know how I can prevent the folder action being aborted when new files are dropped and placing the new files in "Hold", until the previous files are processed? How can I prevent a folder action being aborted when a item is dropped into another folder?I've written a small script to test this behaviour. Just create one or more folders and attach the script below. Drop a item into the folder, wait a few seconds and drop another one in the same or another folder. To monitor what happens please check the console. [code]
Info:
Mac OS X (10.6.8)
View 2 Replies
View Related
May 30, 2012
im trying to make folders and name them with structured names but im getting an error and im not sure what im doing wrong.
the error i get is:Finder got an error: Can’t make "/Users/USERNAME/Desktop/Fake Server/Project Name" into type item. ----------------------these variables are just used for my example, the actual script asks for input and makes that into the variables ------------------- set the_folder to "Macintosh HD:Users:USERNAME:Desktop:Fake Server"set theChosenOne to "Selected"set Code to "ABCD"set Number1 to "12345" set projLocation to (POSIX path of the_folder & "/" & theChosenOne)set folderTags to Code & " " & Number1 tell application "Finder" make new folder at projLocation with properties {name:folderTags & " artfile"}end tell
Info:
Applescript, Mac OS X (10.7.4)
View 6 Replies
View Related
Jul 2, 2012
Please accept my apologies if I'm posting in the wrong section . I've been using the fantastic Create Booklet PDF Service (workflow) by Christoph Vogelbusch (his page is on .mac, so it just went bye-bye). I'd like to turn this worklfow into a folder action so that when a file is added to the folder, a pdf booklet is created automatically. In particular, I'm interested in doing this in Microsoft Word. Can anyone tell me if this is even possible, and if so, either point me in the right direction (or, at least, to the best Automator community where I might repost this request)?
Info:
2.2 GHz Intel Core 2 Duo MacBook Pro, Mac OS X (10.6.3)
View 1 Replies
View Related
Mar 19, 2012
I am currently trying to generate a report using the headers from Apple Mail. The script I have works, but I would like to be able to pull out messages that are sent to a specific recipient ( a certain distribution group in this case...).
[Code]...
View 1 Replies
View Related
Mar 27, 2012
this is my second script im trying to create. What i would like this script to do is have the user input and ip and ping that address my problem lies in getting ip address from the dialouge box into the "do shell script", this is my script so far set Ip_address to ""set Dialog_1 to display dialog "Enter Ip Address" default answer "" with title "Ping"set the Ip_adress to the text returned of Dialog_1set ping to (do shell script "ping -c 2 & Ip_address & ")if ping contains "64 bytes" then display dialog "Connection Secessful"
And also how do i make a variable so if it comes back i unresponsive i can have a dialog box say "Connection Unsecessful" (I know i can do this maunally but i would like to create a script so its easier for the end user)
Info:
MacBook, Mac OS X (10.6.8)
View 10 Replies
View Related
May 14, 2012
I manage a small deployment of different macintosh products and I currently have to run 5 different images so that the background images look right on all the various resolutions. I have been working on a piece of applescript to prompt the user on first startup to select their hardware type to apply the proper background image but I am running into a few issues. Firstly the method I am using limits me to three options and I cant seem to find any documentation on how the list function works..Second, I keep getting errors saying the files can't be found. [code]
View 2 Replies
View Related
Jun 22, 2012
I am just starting out with applescript and could do with a pointer please. I have written a script which saves two pdf files from an active Illustrator document in the source folder of that document. The issue I am have now is that I cannot get the two files to combine into a single PDF file. The whole script is quite long and is works apart from the combine PDF part?
tell application "Finder" try open (every document file of container of file_path whose name contains ".pdf") on error display dialog "no PDF file located"
[code]....
Both PDF documents open and are set as the variables docRefA and docRefb, but the acrobat command 'bring to front' and 'insert page' do not seem to be working. I get an error come up in an illustrator dialog box saying "Adobe Acrobat Pro got an error: document "84056_R1.pdf" doesn't understand the bring to front message".
Info:
Mac OS X (10.6.8)
View 14 Replies
View Related
Aug 24, 2004
What's the deal with that? How can I fix it? I already tried reinstalling Safari, so obviously that didn't work, unless I didn't do it right. Any ideas?
View 5 Replies
View Related
Nov 2, 2009
I'm looking for an application with the ability to search matching strings (as designated as anything between a set "prefix" and "suffix") and display them (or what would even be BETTER is if it could write them to a text file).
I've looked into text wrangler and it doesn't fit my needs because it can only do it on a file-by-file basis: I am looking for an app that you can point it to a directory and it does this process for all text files in this directory.
Additionally, if it could do two strings as a time (and group them according to the text file, so I could differentiate), that would be even better.
Does anyone know of an app that can do this? If not, is it possible this process be coded (javascript, php, etc)?
View 1 Replies
View Related
Feb 4, 2012
I am trying to make a script that allows me to call a number in Address Book in my Avaya Softphone app. Everything works great except that all numbers need to have "9-1" or "91" before the phone number. This is needed to access the outside line and all calling requires the country code. how to add the 91 to the script so that all phone numbers in the script have this added.
[code]....
Info:
15" Macbook Pro 2.4 Ghz, Mac OS X (10.6.2)
View 3 Replies
View Related
Mar 1, 2012
HiThe usual tale of an Applescript beginner getting lost but, I want to be able to search for a selected membership number within a Numbers spreadsheet, extract that member’s email address and send a message. I have managed to create a script that creates and sends the email but after several attempts I cannot work out how to start searching cells for a particular value and how to extract data from cells in the selected row.
Info:
iMac, Mac OS X (10.7.1)
View 3 Replies
View Related