Applescript to Move Folder to Newly Created Folder
My applescript creates a new job folder and lets me specify the location. I would like to display a dialog at the end that asks if the user would like to move a folder from another location to this newly created folder. If yes, then the user would be prompted to choose the folder, in either case, yes or no, the newly created folder would be displayed.
Any help would be appreciated.
Thanks,
Josh
set jobNum to text returned of (display dialog "Enter a job number:" default answer "")
set jobName to text returned of (display dialog "Enter a job name:" default answer "")
set jobCity to text returned of (display dialog "Enter job City:" default answer "")
set folderpath to POSIX path of (choose folder with prompt "Select client folder")
set myPath to do shell script "/bin/mkdir -p " & quoted form of folderpath & "/" & quoted form of (jobNum & ", " & jobName & ", " & jobCity) & "/{'Contract Docs'/{CO,Insurance,Prelien,'Price Schedule'},/Billing/,/PM/{Piece,Plans,Sequence,Schedule,Trusses,'Walls',Materia l}}"
set question to display dialog "Do you need to move an Estimate Folder?" buttons {"Yes", "No"} default button 1
set answer to button returned of question
if answer is equal to "Yes" then
(if yes then I want to choose a file and have it moved to the newly created parent folder above, then have finder to display the newly created folder)
end if
if answer is equal to "No" then
(If not then I want finder to display the newly created folder above)
end if
Hello
lets play again:
new-moverequest -identity useremailaddress -targetdatabase new database
after two minute get move req log
get-moverequest -identity useremailaddress |get-moverequeststatistics -includereport |fl
or if have got more DC specified one Dc with -domincontroller DCname
sorry my english
Similar Messages
-
Why can't I store files in a newly created folder?
Every time I use the option Save As (from Internet downloads or "Save Image as" on web pages) and try to store it in a newly created folder, this new folder can not be selected. I have to use a trick to select some other folder first (like its parent) and then navigate back to this new folder. Why is that?
T.
iMac 20" Intel Duo Core Mac OS X (10.4.6)OK. Got it! Went to the original folder instead of the alias. Changed the admin privileges to "Read & Write" and, Whala! Now I don't have to enter my password every time I want to add, delete or replace a file in my Utilities folder.
-
Unable to move mailbox to newly created database in exchange 2013
Hi, i created a new database in our existing exchange server 2013 sp1 and i was trying to move my mailbox to the newly created one using the EAC. But the mailbox is not getting moved and i am not receiving any errors. Is there anything else i need to do
after creating the database.
Please advise.Hello
lets play again:
new-moverequest -identity useremailaddress -targetdatabase new database
after two minute get move req log
get-moverequest -identity useremailaddress |get-moverequeststatistics -includereport |fl
or if have got more DC specified one Dc with -domincontroller DCname
sorry my english -
Selecting a group of files and putting them in a newly created folder?
If I select a group of files in finder or on my desktop -- is there a command to create a new folder and put them in it? (I'm thinking of how you can take a selection in iTUNES and create a playlist from the selection).
(I know how to create a folder and then drag my selection into it).
Thanks!Open the Script Editor in the /Applications/AppleScript/ folder and paste in the following:
tell application "Finder"
make new folder at desktop
move (selection as alias list) to the result
end tell
This script expects that two or more items are selected. You can enable the script menu in the AppleScript Utility and then add the script to the menu for easy access.
(17890) -
Need help deleting newly created folder...
So, I'm using an iCal alarm to download a folder of files (.jpgs) using fetch. I then have a folder action set up to move the newly downloaded images to another folder, then they are separated by a "move by EXIF data" action.
This all works well, but I need to delete the folder the images were originally downloaded in, so that when the Fetch/iCal action downloads the folder/images the next day, it doesn't create a new folder with a "-1" added to it.
I have tried all the combinations of "Get Specified Finder Items," "Get Folder Contents" and "Move Finder Items to Trash," but I can't get this one little empty folder to go away...
Any suggestions?
Yer Pal,
Gel-SolNevermind. I figured it out!
I had an unecessary "Move Finder Items" action after a "New Folder" action. This somehow messed up the flow, cuz files are moved within the "New Folder" action. -
Applescript to move incoming mail to a folder
I use IMAP to read mail from different devices, I wish to keep an archive on one computer.
Rule for incoming message moves unread message just fine, but if they have been read from another device they will not be moved by a Rule.
Looking for a work-around, does anyone have a applescript that will run as a mail rule to move incoming (unread or read) messages to a folder?While the applescript below works it has the same problem as the rules, does not move message with read set.
Rule
Created a rule with the following conditions
Account myIMAPaccount
Perfor the following actions
Run AppleScript myMoveScript
Stop evaluating rules
Here's the script:
AppleScript run as Mail rule to Move messages
using terms from application "Mail"
on perform mail action with messages these_messages for rule this_rule
tell application "Mail"
set the message_count to the count of these_messages
repeat with i from 1 to the message_count
set this_message to item i of these_messages
move this_message to mailbox "myArchiveMailbox"
end repeat
end tell
end perform mail action with messages
end using terms from -
Newly created folder in Exchange email account populates to wrong location
I am trying to make a new folder in my exchange-based email account from within Mail. However, when I try to make it show up underneath my inbox in left column (like all the other existing folders) it instead creates the folder in a brand new root directory. I have a pic uploaded at http://gallery.me.com/jgelfond/100035
I want the new folder to be with all of the other folders under the "Seven-Star" inbox at the top, but instead my "test" folder is created in a brand new "Seven-Star" directory at the bottom. I can then manually move that folder to inside any of the folders under the topmost "Seven-Star" folder, but not at the level that the "Clients" and "filing" folders are at.
Any help? Thank you!another note: if I go into the webmail service for my Exchange-based email address and create the new folder there, it will populate in the same place as all of my previous folders (at the top, if you look at the picture). The folders will only be created at the bottom if I create the new folder from within Mail.
Any help would be appreciated! -
Newly created folder not visible in directory tree (Outlook 2013)
We are using Exchange 2007 on-premise and Outlook 2013 on the client computer.
When creating a folder in a (very large) existing folder structure from within Outlook, it is not shown in the client. When logging in onto OWA it is visible.
If we delete the entire client profile and re-create it (causing Outlook to download the entire structure again), the folder is visible.
When creating a new folder after that, the same issue occurs again.I am assuming you are running in cached mode and this is not a shared mailbox. Have you tried forcing a full client synch? This should force the online version of the folder structure to be recopied to the client. What is happening behind the
scenes is that the client is telling the server to add the folder, but the client's information from the server doesn't yet include the new folder - this is why you see the folder disappear. Once you force the resync, the server will deliver the updated
folder listing (which I've noticed doesn't happen automatically, sometimes), and the client will then see the new folder (again). -
Newly Created Folder Under My Folders Does Not show Up in Answers
I created a new folder in My Folders using "Manage Catalog". It shows up in the Manage Catalog window but does not appear in Answers even after I refreshed the display. I've successfully created folders in the past, but this suddenly stopped working. The only thing that I had done was rename the Subject Area in the Administration tool. Does anyone have any insight as to why folders created does not show up under My Folder. However, I am able to create folders under Shared Folders.
Thanks in advance.Hi user9213142,
Just as an FYI, it's customary to award "Correct" points to Ashok for his assistance and setting your question to "Answered" so that other users can benefit from the help.
Best regards,
-Joe -
Can't import to newly created folder (Aperture 3.4.3)
I have created a folder within a project in Aperture 3.4.3 (like I've done a hundred times). Aperture sees the folder but when I select "Import", the new folder (but not my other folders) "grays out" preventing me from importing to it.
Has anybody else seen this? How do I fix it?
Please help! My pictures are backing up on my camera.
Thanks,
BrianYou don't really import into a folder. When you select a folder to import into the images are actually going into the project attached to the folder set in the Project Name box.
Projects can't contain projects so if the folder is under a project Aperture can't make a new project in that folder, hence it is not selectable. -
Mail: AppleScript Mavericks: Error cannot recognize newly created Mailbox
Hi!
I had a simple apple script to sort my mails into folders. After an update (don't know which exactly) my apple script fails to create local mailboxes in mailboxes.
If the mailbox "Archiv/2014" is created, in the next step the script failes to recognize the new created mailbox.
Here the sorting part of the script:
set box to mailbox "Archiv"
set zahl to every message in box
repeat with theMessage in zahl
if (get sender of theMessage) is "xy" or (get sender of theMessage) is "xz" then
move theMessage to mailbox "ABC"
else
set datum to (date received of theMessage)
set jahr to (year of datum)
set monat to (month of datum)
if not (exists mailbox ("Archiv/" & jahr)) then
make mailbox with properties {name:"Archiv/" & jahr}
end if
if not (exists mailbox ("Archiv/" & jahr & "/" & monat)) then
make mailbox with properties {name:"Archiv/" & jahr & "/" & monat}
end if
move theMessage to mailbox ("Archiv/" & jahr & "/" & monat)
end if
end repeat
This throws:
Ergebnis:
error "„Mail“ hat einen Fehler erhalten: Fehler in der AppleEvent-Routine." number -10000
In another script it is tested:
Script and answers:
tell application "Mail"
exists mailbox "Archiv/2014"
--> false
make new mailbox with properties {name:"Archiv/2014"}
--> missing value
exists mailbox "Archiv/2014"
--> false
end tell
Does anybody see my mistake?
Thanks in advance!That's really weird!
Both scripts below create a new mailbox, but only the second script returns true. The two mailbox names differ by only one character.
Script 1
tell application "Mail"
exists mailbox "Archiv" --> false
if not (exists mailbox "Archiv") then
make new mailbox with properties {name:"Archiv"} --> missing value
end if
exists mailbox "Archiv" --> false
end tell
Script 2
tell application "Mail"
exists mailbox "Archivs" --> false
if not (exists mailbox "Archivs") then
make new mailbox with properties {name:"Archivs"} --> mailbox "Archivs"
end if
exists mailbox "Archivs" --> true
end tell -
Exchange 2013 public folder can not create folder
hello,
we have migrate public folders to20102013.
we can not createfolders / files inpublic folders.Access Rights seems to be
ok on the control panel
in Outlook, we can not apply change permissions
what can i do to fix that ?
all the public folder have migrate on the secondary mailbox public folder like the technet KB
Please, help us !
thank youCould you please have a look at below mentioned links ? May be, it will help you to sort-out the issue which you are getting right now while moving public folder :
http://redmondmag.com/articles/2013/07/15/exchange-2013-cu2.aspx
http://www.msexchange.org/articles-tutorials/exchange-server-2013/planning-architecture/exchange-2013-preview-public-folders-part1.html
Carlo -
How can i add movement type with newly created warehouse
Dear expart
In my SAP below messgae is showning at the time of pass the
transaction code :MIGO
"WM movement type 101 not allowed foe warehouse ABC"- How can i sovle the problem .Plz tell me the SPRO.
YeasinHi,
You can define WM movement type in V_T333:
SPRO > LE > WM > Activities > Transfers > Define Movement Types - here you have to define WM mvt 101 for your WH ("ABC").
LE-WM Interface
SPRO > LE > WM > Interfaces > IM > Define Movement Types - here you can connect WM reference movement type to IM mvt and then WM mvt to WM reference mvt.
Regards,
Csaba -
Applescript. Moving files to an other freshly created folder
I want to daily backup my entourage DB to an other disk.
However i totally stuck and have no working code to do the actual moving.
first I want to create a folder that is unique.
tell application "Finder"
activate
make new folder at folder "XX" of folder "Backup Outlook" of disk "Data XX" with properties {name:(do shell script"date '+%d.%m.%Y'") & ("Outlook BU XX")}
end tell
Easy.
Now I am stuck as to how to move the DB to the newly created folder. Have tried stuff but I do not even get Applescript to accept the code I write. So nothing worth posting here. Sorry about that.
Thanks for the suggestionsThanks twtwtw
So simple when I see it.
I made it in to:
tell application "Finder"
set newFolder to make new folder at home with properties {name:do shell script "date '+%d.%m.%Y'") & ("Outlook BU Y")} -- folder "XX" of folder "Backup Outlook" of disk "Data XX"
duplicate file "Users:X:Documents:Microsoft User Data:Office 2011 Identities:XY" to newFolder
end tell
Running this I get an error:
error "Finder got an error: Can’t set folder \"11.05.2011Outlook BU Y\" of folder \"e\" of folder \"Users\" of startup disk to file \"Users:X:Documents:Microsoft User Data:Office 2011 Identities:XY\"." number -10006 from folder "11.05.2011Outlook BU Y" of folder "e" of folder "Users" of startup disk
Not sure what I do wrong.
Secondly I wanted to set the target folder not to the Home folder (I am still on the same disk than where the original resides and the idea is to have a safe backup somewhere else) but to folder "XX" of folder "Backup Outlook" of disk "Data XX". Not sure how to do this. -
How to move pics from "picture library" to created folder
Just started using 9310 (from 8330) with new SD card. Have a few pics on it and can't figure out how to transfer a photo in "picture library" into a newly created folder. Was so easy on 8330 with simple "move into folder" option... HELP! Thanks!
Hello equipagekm,
Welcome to the forums.
The option to move to folder will not be present but what you can do is choose the "cut" option and then once in the new folder hit the menu key and choose "paste".
Hope this helps. Let us know if you need anything else.
-SR
Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)!
Maybe you are looking for
-
Get unique values from Parent List in Dropdown List SPServices
I have a dropdown list created using the SPServices ($().SPServices.SPCascadeDropdowns). It works as it should, I just need to add a requirement. I need to be able to filter the Parent Lookup list to show only unique values. $().SPServices.SPCascadeD
-
Oracle 10g rac install on vmware with server 2003 error
INFO: Command = C:\WINDOWS\system32\cmd /c call C:\oracle\product\10.2.0\crs/install/crssetup.config.bat Successfully accumulated necessary OCR keys. Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897. node <nodenumber>: <nodename> <private i
-
I have a Iphone 4 gsm (8f190) and it will not connect to itunes and when i put it in recovery itunes will not work. It won't show up when plugged into the computer. Only charges when plugged in the wall or a car charger. I've tried everything imag
-
Error message:Adobe Reader
I cannot open any reader files! I keep getting the this message: Adobe Reader has encountered a problem and needs to close. Sorry........ When I click for more information this comes up: Error signature AppName: acrord32 exe Appver 10.1.0.534 Mod
-
I had my schools iPad connected to my laptop on iTunes and then i looked at my iPad and i didnt have any of my apps. How do i get them back?