Mac Help Forums


Reply
Thread Tools Display Modes

Moving files & creating folders to move them in.

 
New Member
Join Date: Jan 2012
Posts: 1
 
      7th January 2012
Just starting to create Applescripts with the responses found here.
I have already created the move script, so that part is more of a question. Depending on the answer a new script may be needed.
The question is, if a move script is always running & new files are placed in the watched folder, does the script wait until the file is stable before it starts to move the file?
Also, I would like the files MOVED, not copied. And although the original move script only copied the file, I added a delete line. I'm wondering if the files might get deleted before they are completely moved.

The AppleScript I have yet to create, if possible would be to create a folder based on the name of a file and then move subsequent files into the appropriate created folders.
For example, the file is named SBSE_xxxxxxx_0108.
The AppleScript would create a folder called 'SBSE_0108' and drop the file into that folder. Any other file that started with SBSE & ended with 0108 would be moved there as well.
Another file comes in as is called WS_xxxxxx_0108.
The script would create another folder called 'WS_0108' and do the same as above.

Thanks guys for any help.
 
Reply With Quote
 
 
 
 
Senior Member
Kaveman's Avatar
Join Date: Nov 2010
Location: Westland, NZ
Posts: 1,360
 
      9th January 2012
If you are using tell "Finder" and it all in the same script, copy then delete is ok, but use move.

Code:
 tell application "Finder"
	move theFile to theDestinationFolder replacing true
end tell
Yes you can, get the file name, break it into parts, make the folder using the names and them move the files into it. These are the tasks AS is good at.
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with viewing folders, then files in Finder jedward77 New to Macs? 1 3rd January 2012 07:20 AM
moving files between folders, messed it up iluvpiano New to Macs? 2 28th November 2011 10:48 PM
Applescript to delete and move files appatight AppleScript 0 9th March 2011 09:46 PM
Viewing hidden folders and files on a mac dragade3789 New to Macs? 14 11th April 2008 09:41 PM
Applescript to stuff and move files zeyhra AppleScript 3 10th August 2006 08:58 PM


All times are GMT +1. The time now is 05:47 AM.
Mac-Help.com is an independent website and is not affiliated with Apple Inc.


Welcome!
Welcome to the Mac Help Forums
 


Latest Threads
Help! Stupid computer is automatically logging me out
Elizaboo (7 Hours Ago, 10:41 PM)

URGENT Help. Crazy talk Mac!
Joeker (8 Hours Ago, 09:42 PM)

PDF Document
yura (17 Hours Ago, 12:13 PM)

Difficulties with internet speed (nothing to do with connection)
sammethh (23 Hours Ago, 06:36 AM)

Deleting a homepage/website form my mac book pro
rgandajg (1 Day Ago, 10:30 PM)

 


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51