Choose and copy folder
Please help
I have a repetitive task that I do on a weekly basis between all the computers in my office.
I would like to be able to choose a folder such as the home folder then automatically it will back up to destination folder that I choose.
Each time the destination will be different
So lets say I am on station number one and I want to back it up I would have to go to the home folder and go into library and choose mail, calendar, preferences, and keychains and ect, then drag it to an external hard drive or a folder on the desktop.
I have multiple stations that I have to do this with and at times I use different locations on where to save them.
I know this is wrong but here is the idea.
-- I will choose the home folder
set the_source to choose folder
-- will choose lets say desktop folder that I have
set the_destination to choose folder
tell app "finder"
move folder (the_source & "Library:mail") to the_destination
move folder (the_source & "Library:calendars") to the_destination
--ect,ect,ect
end tell
I am grateful for any help on this
There are built-in locations that you can get paths for. One of them is the library folder from whatever user is running the script. The FInder's move command will move the items, but the command you are looking for is duplicate.
When building the file path, the choose folder command returns aliases - you will need to coerce everything to text, build your file path string, and then coerce back to an alias (if desired).
The following script will copy the_folders of the user library to a folder of your choice:
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #FFEE80;
overflow: auto;"
title="this text can be pasted into the Script Editor">
-- copy user ~/Library folders
set the_destination to (choose folder with prompt "Were do you want to save?")
set the_source to path to library folder from user domain
set the_folders to {"Mail", "Calendars", "Preferences", "Keychains"}
repeat with some_folder in the_folders
get ((the_source as text) & some_folder) as alias
tell application "Finder" to duplicate the result to the_destination
end repeat
</pre>
I think the rsync utility would be a better choice for doing backups like this, since files that haven't changed won't be copied. There are several rsync based backup scripts and applications out there, or post back and I can modify one I use for your specific folders.
Similar Messages
-
Choosing and copying in the pdf file
From the security settings of the file, I see that the pdf author has allowed the copying, but I can't choose and copy. How can I do it?
A scan is basically an image; you can't select any (or all) text on it.
The only way to get text out of a scanned image is to process it with text recognition (OCR), which is available in Acrobat or the Adobe PDF Pack service. -
Script to take every 5th file from a folder and copy it to another folder
How can I tell applescript to take every 5th file of a folder of say 2000 files and copy them to another location? I want to copy the 5th, 10, 15th, 20th files and so on of 2000 files so I will have only 400 files.
I guess I want to make a list of all the files and then coerce that to the first and then increments of five but how do I do that?
Thanks.
PedroHi Pedro,
The following script should do what you are asking for:
*set theSourceFolder to choose folder with prompt "Select the source folder."*
*set theTargetFolder to choose folder with prompt "Select the target folder."*
*tell application "Finder"*
*set theFiles to files of theSourceFolder*
*repeat with k from 5 to (count theFiles) by 5*
*move item k of theFiles to folder theTargetFolder*
*end repeat*
*end tell*
Message was edited by: Pierre L. -
i backup my iphone on my pc and copy backup file into drive D then i setup new OS on my pc. after that i copy the backup file into itunes backup folder but itunes can't find the backup file to restore my iphone. how can i restore my iphone?
Don't you just love changes in interfaces?
I found the answer to my question.
When you attach a device (iPhone, iPad) to your Mac, in iTunes 12 in appears as a tiny icon in the second "row" of the iTunes display. Click the icon and the familiar iTunes display for the device appears. From there, on the Summary screen, you can see the dates of the backups of the device (iCloud and backup to the computer). You can also use the button to backup to the computer. -
I have a 2 yr old Iphone 4 and have not backed up or connected to Itunes up for 1 yr. I have new Windows 7 computer and want to connect and copy Itunes backed up folder from external HD (a year ago) to new computer and install new Itunes and new IOS. What steps should I take and what precautions? I don't want to lose any data on my phone such as music, photos, contacts, notes, texts etc, nor lose music from prior backed up Itune folder. Apps should be OK from app store? Thanks for any help.
Hello CosK,
The following guide can step you through the process of using a backup of your iPhone 5 to transfer your content to your iPhone 5s.
Transfer content from an iPhone, iPad, or iPod touch to a new device
http://support.apple.com/kb/HT2109
Should one or both of your phones fail to appear in iTunes, the following article provides troublesooting steps that can assist.
iOS: Device not recognized in iTunes for Windows
http://support.apple.com/kb/TS1538
Cheers,
Allen -
when i connect my iphone with computer i don't see any folder in my computer so that i could open and copy my pictures . how do i fix this problem?? P.S i have been using iphone since 3 years and this is the first time i face this issue.
This is my 3rd iphone 4S while this issue wasn't pressent when i bought it but yesterday while i was watching my pctures suddnly the pictures automatically showed an error! but the folder of iphone with the icon of camera was still there but today i can't see that folder moreover i have synced my phone using itunes on my computer and charged as well so that means its not the connectivity problem.
Another thing i am facing right now is that i made photo stream on in my phone but couldnt find any of picture on my pc i installed icloud panl but still in photo stream there are 0 photos and it never happend in iphone 4 while i am using the same apple id and it shows that it have uploaded my images on i cloud how do i get that???
please help me so i could have my images into my pc
i am using windows 8 and phone is iphone 4S with IOS 6.0.1iCloud: Troubleshooting iCloud Contacts
Yahoo won't sync with iCloud and isn't supposed to. -
Blackbery Link - browse pc folders and copy mp3 files not in music folder
Hello to all of you
I have music archives in different drives and pendrives
It is not intuhitive at all how to browse local PC drives and or PC folders to select and copy single or many .mp3 files from the PC to the BlackBerry device.
Please don't tell me that the silly solution is to move the mp3 files to the windows music folder.
Additionally, i find really against an user friendly approach the BlackBerry Link in the music section. It doesn't allow to show the mp3 files names and use, manage and browse .mp3 files by their name, I see only
- All the music
- Album
- Artists
- Genres
- Playlists
well,
- I have so many .mp3 files
- they don't have all the mp3 tags
- I see only an unfinished list which doesn't allow me to select the file I need, and I must scroll all of them every time
A TOTAL NO SENSE in my personal opinion
Anyway , from BalckBerry Link and from PC side, how to select one single mp3 file, QUICKLY, and copy it inside the BlackBerry device in the music folder?
Thank you
C0rYes CRAZY!!! It is confirmed,
trying to find a solution to this crazy behavior, I've turned to documents side.
I've added my mysic folder to the documents and TA-DAAAH! The .mp3 files don't show!!!
On the right panel a big string says "The folder doesn't contain supported files"!!!
Well, looks like that BlackBerry Link leaks like the OS 10
Anyway, if you can provide a solution that allows to copy mp3 files ID3-less (http://en.wikipedia.org/wiki/ID3), mean that none of the ID3 has been filled, thank you so much in advance.
To BB Link developers, think about allow users to tranfer files as files and not as you arbitrary want, thank you.
C0r -
Automator: Apply Color Label and Copy to Folder
I'm trying my hand at Automator, and I need help with one of my workflows (⇪). Basically, it's a service (accessible via right-click) that will apply a color label on an image file, and then copy that image file to a corresponding folder with the same color label. My current version works fine, except for the fact that I had to create seven versions to accommodate all seven colors.
Is there any way to turn the color into a variable? I want the workflow to prompt me for a color, and then use that choice to run a search for the appropriate folder. I'd rather not hard code the color choice into separate services that all do the same thing.
Also, the service currently assumes that it will run fast enough before I can deselect the target file. I'm sure it's possible that the folder search could lag out while I select another file, and the service will ultimately copy the newly selected item, rather than the initial target. Is there a way to ensure the service acts on whatever was selected when it was first triggered?
I don't know AppleScript beyond copying-and-pasting other people's codes, so that limits my automation quite a bit. I don't know how to prompt for a label index choice and then feed the result into a find function. I also don't know how to record the file path of the selected item, and then feed that into the copy function at the end to ensure it doesn't copy the wrong file.Typically a list of items is passed to a workflow, so you will usually (depending on what you are doing with the items) need to step through the items in that list. If there is only one destination folder with the target label, you can just search for it, otherwise you will need to specify the destination in some other way.
The following Service workflow example assumes that there is only one destination folder that has a given label color. It gets the label index of one of the input items and finds a folder with the same index at a specified base location (to limit the search range).
1) Input items are automatically passed to an application or service, otherwise another action to get FInder Items can be used
2) *Label Finder Items* (show the action when the workflow runs)
3) *Run AppleScript* (paste the following script)
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
font-weight: normal;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px; height: 340px;
color: #000000;
background-color: #DAFFB6;
overflow: auto;"
title="this text can be pasted into an Automator 'Run AppleScript' action">
on run {input, parameters} -- copy to a labelled folder
This action is designed to follow a "Label Finder Items" action. It will get the
first folder of the base folder that has the same label and copy the input items
to that folder.
input: a list of Finder items received from a "Label Finder Items" action
output: a list of Finder items to be passed on to a following action
set output to {}
set skippedItems to {} -- this will be a list of skipped items (errors)
set baseFolder to (((path to pictures folder) as text) & "Shelley:Mary:") as alias -- a place to start looking for the destination folder
tell application "Finder"
set theLabel to label index of (the first item of the input) -- just pick one, they should all be the same
get folders of (entire contents of baseFolder) whose label index is theLabel -- include subfolders
-- get folders of baseFolder whose label index is theLabel -- no subfolders
if the result is not {} then
set theDestination to the first item of the result
else -- no folder
error number -128 -- cancel
end if
end tell
repeat with anItem in the input -- step through each item in the input
try
tell application "Finder" to duplicate anItem to theDestination
set the end of the output to (the result as alias)
on error number errorNumber -- name already exists, etc
set errorNumber to " (" & (errorNumber as text) & ")"
-- any additional error handling code here
set the end of skippedItems to (anItem as text) & errorNumber
end try
end repeat
showSkippedAlert for skippedItems
return the output -- pass the result(s) to the next action
end run
to showSkippedAlert for skippedItems
show an alert dialog for any items skipped, with the option to cancel the rest of the workflow
parameters - skippedItems [list]: the items skipped
returns nothing
if skippedItems is not {} then
set {alertText, theCount} to {"Error with AppleScript action", count skippedItems}
if theCount is greater than 1 then
set theMessage to (theCount as text) & space & " items were skipped:"
else
set theMessage to "1 item was skipped:"
end if
set {tempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
set {skippedItems, AppleScript's text item delimiters} to {skippedItems as text, tempTID}
if button returned of (display alert alertText message (theMessage & return & skippedItems) alternate button "Cancel" default button "OK") is "Cancel" then error number -128
end if
return
end showSkippedAlert
</pre> -
How to choose switches, ipphones and copy machine for small business?
Hello,
I'm designing a network system for Nextrio Company. Right now, I'm going to choose a copy machine which has fax function; a small switch which could connect this copy machine and several other computers; several ip phone for small business.
Could you tell me the type and cost of these devices I should choose?
Many thanks,Hi Hanhan,
For the least amount of operational expernditure, and for great functionality at a small business price, I would suggest humbly that you look at the 300 series switch family.
The tolly group comparative report on our switch can be seen at the following link.
http://www.cisco.com/en/US/prod/collateral/switches/ps5718/ps10898/Cisco300SeriesLANSwitchComparison.pdf
I would suggest you check out the following models and get pricing. the switches come in 10/100Mb/sec speed or Gigabit speeds depending on the switch port count and your needs;
Model Name
Your ordering P/N
Description
Fast Ethernet - access port 10/100MB/sec
SF300-08
SRW208-K9
• 8 10/100 ports
SF302-08
SRW208G-K9
• 8 10/100 ports• 2 combo* mini-GBIC ports
SF302-08P
SRW208P-K9
• 8/10/100 PoE ports• 2 combo mini-GBIC ports
SF302-08MP
SRW208MP-K9
• 8 10/100 Maximum PoE ports
• 2 combo mini-GBIC ports
SF300-24
SRW224G4-K9
• 24 10/100 ports
• 2 10/100/1000 ports
• 2 combo mini-GBIC ports
SF300-24P
SRW224G4P-K9
• 24 10/100 PoE ports
• 2 10/100/1000 ports
• 2 combo mini-GBIC ports
SF300-48
SRW248G4-K9
• 48 10/100 ports
• 2 10/100/1000 ports
• 2 combo mini-GBIC
SF300-48P
SRW248G4P-K9
• 48 10/100 PoE ports
• 2 10/100/1000 ports
• 2 combo mini-GBIC ports
Gigabit Ethernet - access ports 10/100/1000Mb/sec
SG300-10
SRW2008-K9
• 8 10/100/1000 ports
• 2 combo mini-GBIC ports
SG300-10P
SRW2008P-K9
• 8 10/100/1000 PoE ports
• 2 Combo mini-GBIC ports
SG300-10MP
SRW2008MP-K9
• 8 10/100/1000 Maximum PoE ports
• 2 combo mini-GBIC ports
SG300-20
SRW2016-K9
• 18 10/100/1000 ports
• 2 combo mini-GBIC ports
SG300-28
SRW2024-K9
• 26 10/100/1000 ports
• 2 combo mini-GBIC ports
SG300-28P
SRW2024P-K9
• 26 10/100/1000 PoE ports
• 2 combo mini-GBIC ports
SG300-52
SRW2048-K9
• 50 10/100/1000 ports
• 2 combo mini-GBIC ports
regards Dave -
I am having issues suddenly exporting files. It reads error exporting 25 files, As I attempt to choose another destination folder the folders show a black square where the folder sign previously was. I am in my busy season and this has created a huge delay!!! HELP!!!!
oh and if you use a creative cloud version of Lightroom it could also be that the logon to the cloud is messed up. Logging out and logging back in from preferences in the creative cloud app will fix that. Due to the release of Lightroom CC it appears that adobe's servers have been overwhelmed a bit And many people have strange problems that are solved by logging out and back in.
-
new user...how do you drag or move or copy a file or folder from the desktop to an external drive? I have tried dragging and copy/pasting.
My guess the problem you are running into is the drive is formatted for a PC as NTFS. OS X can read files from NTFS however it cannot write to it. Check the formatting on the drive, if it's NTFS then it should be reformatted to Mac OS Extended (Journaled), you can use Disk Utility to do this.
If you still have a PC and want to share the EHD with the PC and Mac please read MacWorld's Share an external drive between a Mac and a PC article. -
Copy playlist to usb-stick and keep folder structure
Is there an easy way to copy a playlist from iTunes to a USB-stick (for use in the car)? The folder structure of artist > album> track should be kept.
If you simply use drag and drop, iTunes copies all songs into one folder."Files to Folder Scripts
This is a collection of two scripts: Alias Files to Folder... which creates an alias of each file of the selected iTunes tracks in a user-selected location, and Copy Files to Folder... which will copy the files of the selected iTunes tracks to a user-selected location."
It appears the first one just puts an alias in a single folder. The second one looks like it copies the files to a single folder which is pretty much what the OP is doing already with dragging. -
i would like to email pictures from my photo album in ipad but the logo of email is not there to send. I can only choose FB, copy and print. what happen to my email logo?
I wouldn't want to say exactly, however I would imagine that it has to do with the fact you use the same Apple ID on both devices. Since Facetime was activated on the phone, with the number, and then activated on the iPad with the email and same Apple ID, they are somehow linked. I'm not sure that you can separate it without having a different Apple ID on the two devices. Otherwise you can look at this support document http://support.apple.com/kb/TS3367 and see if that helps you any.
-
itunes will not open (win 7) followed instruction on a help forum. i get down to step 6 and copy and paste "C:\ProgramData\Apple Computer\iTunes\SC Info" and it comes up folder emty? ideas..
Hi Mac Attack,
My computer will not disconnect from the internet. It seems to find a clone router and continues even when I shut down and unplug my my own home iy
Your main question was 'chopped' in the title. Please reply in the body of a reply box with the full question and anything you have tried. And no, the long report was not helpful .
If the same website is opening each time you launch a browser (Safari?) hold down the shift key as you launch to prevent previous pages from opening.
Have a look at your settings in Safari > Preferences. Especially General and Privacy.
Reset Safari to remove cookies and other stored data.
System Preferences > General
Have a look at your settings in System Preferences > Security & Privacy.
Call back with more questions.
Regards,
Ian -
Retrieve files from a text list and copy them to other location?
Hi,
I work as a photographer: my clients often send me their final selections of my pictures as a text list (i.e. file001.jpg file 004.jpg file 054.jpg and so on), so I have to go back and pick each picture "by hand": this is a huge waste of time since I'm dealing with hundreds of picks in thousands of files.
My question is: is there a way to retrieve and copy the selected files automatically? I was thinking about feeding the list of files to Automator, but I can't seem to find a way to do it.
any hints?
thanks in advance
Andreaok I seemed to have it sorted out...
Niel, I'm no programmer at all, but thanx to your script I was able to come up with this:
tell application "Finder"
set source_folder to choose folder with prompt "Select folder with all pictures"
set the_files to every paragraph of (read (choose file with prompt "Select text file with the names of the pictures to be copied"))
set target_folder to choose folder with prompt "Select destination folder"
repeat with this_file in the_files
try
duplicate item this_file of source_folder to target_folder
end try
end repeat
end tell
that seems to work!
needs some fine tuning, like including subfolders of the first folder chosen!
THANX AGAIN!
Message was edited by: SAPO!!
Maybe you are looking for
-
Can not create the connection in the enrironment!!
hello,every one: please see the following code: Environment *env = Environment::createEnvironment(Environment::OBJECT); Connection *conn = env->createConnection(userName,password,connectString); try //use the conn catch
-
Translation of payment terms in CS and SK in program SAPLFHL2
Hello, is there somebody who works on a system with system language CS and/or SK, who might send me the translations of the text symbols of program SAPLFHL2? In english, they are these: 001 Field name;; 002 Fd name 003 Field description 0
-
Hi, I am having trouble saving the data using the 'Write to measurement to file'. I am using Lab 8.2 with module NI-9211 Here is my problem. I have many channels and I have set the clock setting to (sample to read = 2 every 0.5 sec). Each of these da
-
I have Lightroom 5.7.I start syncing with Lightroom mobile about 2500 photographs. But catalog have new tab about 600 photographs. It's name "All Sync Errors". I want to sync all photographs. I tryed all sync errors photographs move all synced photog
-
Hello. I have GeekTool running on my desktop and I want to display a list of the top running processes and their ram usage. I have the current command that works: top -orsize -l1 | sed '1,11d' |awk '{print $2 " " $11}' However, I want the usage in th