Another Automator thread... Bwana please help.

Sorry, not going to be of much help since I wouldn't use automator to do this task.

What I would do is search within that parent folder for the movies (either by type or by file extension) and then just select them all and move them to the parent folder.

Hope someone can help you though.
So easy this way.

But at least the OP is learning about the other way to do things.
 
thank you koffiejunkie for showing me this terminal thing.

its pretty cool, ill try some things on it to get a grasp on it, but i dont want to stretch your helpful hand

No worries, I wasn't going to go any further with this - it's getting too complex to remote-advise.
 
Unfortunately I was a bit late to this one, as I had an existing script handy for this. So if anyone is still interested in a complete solution (using Applescript), then here it is:

Create a new file (with a .scpt extension) in Textedit or the AppleScript Editor; copy and paste the code below & save. Launching this new file will open up the AppleScript Editor allowing you to run it.

For a self contained app (.app extension); in the AppleScript editor choose the menu FILE, EXPORT and specify Application as the file format.

Code:
[FONT=Lucida Sans Unicode][SIZE=1]-- change fileExt to the required file types *)
set fileExt to {".m4v", ".mp4", ".avi", ".mkv"}

-- realMove makes use of OS X finder standard move functionality. 
-- If however you are moving files from an unreliable external drive
-- and/or network connection, it might be more reliable to set realMove
-- to false, to ensure that a delete only follows after a successful copy
set realMove to true

-- prompt for SOURCE and TARGET folders
tell application "Finder" to set sourceFolder to folder (choose folder with prompt "Select SOURCE folder.")
tell application "Finder" to set targetFolder to folder (choose folder with prompt "Select TARGET folder.")
processFolder(sourceFolder, targetFolder, fileExt, realMove)

on processFolder(folderToProcess, targetFolder, fileExt, realMove)
	tell application "Finder"
		set theItems to every file of folderToProcess
		repeat with theFile in theItems
			copy name of theFile as string to FileName
			repeat with ext in fileExt
				if FileName ends with ext then
					try
						if realMove then
							tell application "Finder" to move theFile to targetFolder with replacing
						else
							tell application "Finder" to duplicate theFile to targetFolder with replacing
							tell application "Finder" to delete theFile
						end if
					on error errStr number errorNumber
						-- ignore any errors
					end try
				end if
			end repeat
		end repeat
		set theFolders to every folder of folderToProcess
		repeat with theFolder in theFolders
			try
				my processFolder(theFolder, targetFolder, fileExt, realMove)
			on error errStr number errorNumber
				-- ignore any errors
			end try
		end repeat
	end tell
end processFolder[/SIZE][/FONT]
 
Last edited:
Top
Sign up to the MyBroadband newsletter
X