Move file dropped in a folder?

ok, let's start here then, what automation setup do i need to have a file that is dropped into "music download" moved into "archive", so that when a file is dropped in the folder, this automation is triggered, also, it will be from a download, so i need the automation to not kick in until the file is complete, after this, i can handle the itunes converting automation, that seems to work fine

You can save your workflow as a Folder Action plugin - the folder action will trigger when something is added to an attached folder, and the added items are passed to your workflow. To wait for a file to finish downloading, you can use something like the Wait for FInder Items action from Automated Workflows, or you can use your own Run AppleScript action:
1) Run AppleScript:
<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: #FFEE80;
overflow: auto;"
title="this text can be pasted into an Automator 'Run AppleScript' action">
on run {input, parameters} -- wait for items to finish copying/downloading
set output to {}
set SkippedItems to {}
repeat with anItem in the input
if (WaitForCopy of anItem for 90) then -- change the timeout as desired
set the end of the output to (contents of anItem)
else
set the end of SkippedItems to (anItem as text)
end if
end repeat
ShowSkippedAlert for SkippedItems
return output
end run
to WaitForCopy of TheFile for TimeToWait
waits up to the TimeToWait for TheFile to be copied/downloaded
the test is based on the busy status of the file
parameters - TheFile [mixed]: the file to check
TimeToWait [integer]: a maximum timeout value in seconds
returns [boolean]: true if copy/download finished, false if timeout
set {TheFile, Interval} to {TheFile as text, 2} -- change the check interval as desired
if TheFile begins with "/" then set TheFile to (POSIX file TheFile) -- assume a POSIX path
repeat (TimeToWait div Interval) times -- check every Interval seconds
delay Interval
set {size:TheSize, busy status:Busy} to (info for (TheFile as alias))
if not Busy and (TheSize is greater than 0) then return true
end repeat
return false -- timeout
end WaitForCopy
to ShowSkippedAlert for SkippedItems
show an alert dialog for any items skipped, with the option to cancel 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>
2) Move Finder Items {To: your archive folder}
3) ...the rest of your conversion workflow

Similar Messages

  • Mov files dropping video and audio frames CC 2014

    I have been experiencing playback issues in Premiere and just got off the phone with Adobe support. It appears that there is known issue with .mov files dropping video and audio frames that will likely be fixed in the next release. My entire project is .mov files and we need to get some serious editing done to complete a rough cut of our film. As a bandaid, we have reverted the playback renderer to software only and I am experimenting with different preview file formats to see if I will have less dropped frames. I want to avoid converting my media from mov files at all costs as this would be very time consuming with over 100 hours of footage.
    Please let me know if you have any other workarounds!
    Sandy
    Windows 7
    Adobe CC 2014 (up to date)
    Nvidia Quadro K2000 (driver up to date)
    16 GB RAM

    Welcome to the forum.
    Unfortunately, MOV can hold all sorts of "stuff." See this article for some more detail: http://forums.adobe.com/thread/440037?tstart=0
    Can you let us know what is inside that MOV "wrapper?"
    Thanks, and good luck,
    Hunt

  • HT201737 how to move files into a finder folder

    how do I move files into an existing folder in finder on MacBook Pro?

    I am attempting to move some EXEL files that have been saved as documents.  When I open finder, these files do not appear in the recent, or last 30 days section so I need to search fro them.  When they are found they are not on the page where the folder exists so I don't seem to be able to drag them to the folder. 

  • MOV files in computer video folder don't DL to My Library in iTunes

    I have several MOV files on my computer in the video folder which I would like to DL to my library in iTunes and then burn DVDs. I have tried "add file". The title appears, but the time is 00. There is no download. I have Quicktime Pro. Does anybody have a solution? I have spent hours on this but have not been successful.

    - Do you have Restrictions set that would prevent the syncing? Settings>General>Restrictions
    - Do they play in iTunes?
    - Is the format or source different that the one that do sync?

  • Trying to move files into a new folder and th finder folders disappear and show latest open application

    I did not have this problem running the beta. I upgraded to the shipping version yesterday and whenever I try to move a file or application into another folder, both folders disappear, the desktop screen flashes, then I see the finder folders behind whatever application I had open last sitting on top of the finder window. If I let go of the mouse nothing moves and the windows close.
    2013 MacBook Pro 13" retina, 10.10 shipping version

    I'm having the same or similar issue...  I think...  trying to do a little house cleaning in the file structure.  For example, in our events folder I'm creating archive folders (i.e. - 2004, 2005, ect...) and when I use the Files Panel to drag and drop the past event pages into the newly created archive folder, the pages loose all their links.
    Image link prior to and after moving are the same (../images/logo1.gif)
    It does ask me to confirm that I want to move the file but nothing about updating the links.  Is it due to the way the files are linked in the original files?
    Thanks in advance for any help!!!

  • When will my icloud folder reflect memory upgrade? I am trying to move files from google drive folder to icloud.

    My icloud folder does not reflect storage upgrade.  I only had 25GB on my google drive and I have 500GB on my icloud but cannot move these files over. Whats up?

    How much free storage do you have on your system drive?  Since all files on iCloud Drive will be mirrored on your system drive as shadow copies in your user library, you can only keep as many files on iCloud Drive as can be kept on your system drive as well.
    You cannot use iCloud Drive to save space on your system drive, if that is what you are trying to do.

  • How can I batch move files to the same folder structure in a different location?

    Hi,
    I recently had an issue with my iTunes Library so I used the Organize Library feature to have iTunes organise my library.  What happened was that it put all of my music in a folder called 'Music' on my external hard drive, whereas previously it was not in a folder at all, e.g.
    BEFORE: External Hard Drive / Abba / Greatest Hits / Mama Mia.m4a
    AFTER: External Hard Drive / Music / Abba / Greatest Hits / Mama Mia.m4a
    I don't have any particular issue with the updated folder structure, except that I had copies of the artwork for each album in my album folders, and these weren't moved when the audio files were moved/consolidated/organised.  So I need to find a way of moving all of the artwork to the new folders, e.g.
    External Hard Drive / Abba / Greatest Hits / folder.jpg
    needs to become:
    External Hard Drive / Music / Abba / Greatest Hits / folder.jpg
    I have to do this for 3,000+ albums, and I have multiple artwork files for some albums, so I am hoping that there is a way of doing this using a batch/automated method of some kind, but I haven't been able to turn up anything yet.
    Can someone help with this?
    Thanks,
    Nick

    You can make a smart playlist containing episodes of both series and play from that. Podcasts are linked together by the URL they are served from so merging ongoing series isn't really practical.
    tt2

  • Unwanted rescaling of 1280x720 mov-files (Aiptek AHD200/A-HD720P-avc/H.264)

    Hello,
    we currently bought a Aiptek AHD200 camcorder, which is sold in the US as "A-HD720P".
    Its a neat toy for 130 Euros (about $120-150 in the USA).
    The 1280x720 video is better then on our old 200 Euro discount-camcorder, and even though the AHD200 lacks optical zoom, the other features and the price make it worth its money.
    The only problem is editing the movies on my fiance's MacBook.
    She has iMovie HD (version 6).
    The MOV-Files (avc/H.264) take very long to import, and ojn our first atempt they get converted to 4:3 with black borders.
    Finaly the resolution seems to be changed, no matter what we will set up in the settings (which are very minimalistic, really. I know it is a beginner's editor but it really should allow a tad more advanced settings).
    Does anyone have an idea how to import these video clips right?
    Or a cheap/free solution to edit these clips?
    Converting them to another format would be an option, but the quality would decrease if the clips would need to be converted once more. Also, it takes long for 720p movies.
    I did youse avidemux on Mac and Windows, but the saved videos are corrupted most of the time and there are only basic cut functions available. Not that I would like fancy transitions, but its a bit too basic to really edit a video.
    I would be thankfull for any suggestions

    Hello,
    I solved the problem
    As I am rather new to iMovie, I missed the little arrow for the advanced options to switch to HD... Shame on me.
    Still, importing takes a long, long time, but there is a walk-arround which I found in another forum (even though I was looking for something else).
    Rightclick the iMovie project, choose "view package content" (or whatever its called in english) and just drag and drop the .mov-files into the Media-Folder.
    The Clips will then be shown in the iMovie trashbin when opening the project again, and can be dragged to the clips or timeline without the import!
    My guess is that with this the back-to-tape wont work since iMovie did not convert it to a DV Stream.
    Working with the h.264 like this works well, just some graphical glitches (so far no problem in the export though, even Keyframe excat-Cut works like a charm).
    This way there will be only one conversion: When creating a DVD.
    It saves a long time since converting the h.264 takes a while.
    I have a new problem though:
    I also have a g4 iBook, 800MHz.
    Its with a older iMovie of course, and it still creates a regular project folder. With that, this trick will not work.
    Which iMovie versions will run on g4 AND store the project as this single file?
    As far as I saw iLife 08 requires a G4 866MHz, but the included iMovie will only run on a g5 (though I read that Apple seems to provide a Download-Link with a older version if you enter the registration-Number).
    So i Checked ebay and iLife 04, 05 seem rather cheap- and I have no reason to buy 08 just to upgrade my g4 to a old version anyway.
    Which iMovie versions will run on g4 AND store the project as this single file?
    (10.3.9)
    Thanks in advance
    Marcus

  • I want to transfer my photo and movie files from my iPhone 4S to my mac.

    I have posted this question before without any success and was hoping by reposting it may promt a solution to my problem.
    I want to transfer my photo and movie files from my iPhone to my Mac OS X (10.5.8).
    But I don't want to use Cloud or iTunes.
    Is there a way to connect my iPhone 4S to my Mac directly,
    say ... via a program or such on my MAC, to drag and drop the photos and Movie files,
    directly into a folder. ??????????
    Reason want to connect iPone to MAC or MAC to iPhone is ....
    I have no DATA on my iPhone Mobile plan at moment.
    So Photosync app is no good, as I can't download the app to my iPhone.
    I can download a Photosync to my MAC ...
    but with the Photosync app you can only send data.
    Thanks in advance for any help.

    Sorry I should of mentioned ....
    Reason want to connect iPone to MAC or MAC to iPhone is ....
    I have no DATA on my iPhone plan at moment.
    So Photosync app is no good, as I can't download the app to my iPhone.
    I can download a Photosync to my MAC ...
    but with the Photosync app you can only send data  (so needs to be on the  iPhone).

  • Links to MOV files from PDFs don't open in Safari

    I have a website that loads PDFs to the user's browser. In the PDF are links to Quicktime MOV files which open floating windows in which users can see videos. These work fine in both Firefox and Windows Internet Explorer on both of my Win 7 64-bit PCs. And they work in Safari on my son-in-law's Mac laptop, which runs OS 10.5.8, although not in Firefox on his laptop. The symptom is that the PDF (or browser) does not seem to even know that the cursor is positioned on a link; that is, the cursor does not change to a pointing finger as it should, and of course clicking on it has no effect.
    On my desktop G4 (867 MHz), booted to OS 10.5.8) the links are also not recognized as such (no pointing finger) in both Firefox AND Safari (version 4.0.2, although the download package claimed it was installing 4.0.5). Or rather the icon I downloaded claims to be Firefox, but appears merely to point to a Mozilla web page. So I suppose we don't know about Firefox. What we can say is that Safari 4.0.2 on my Mac G4 PowerPC tower with 10.5.8 booted functions like Firefox on my son-in-law's Mac 10.5.8 laptop - unawareness that the links even exist.
    Booting in OS 10.4.11 (which I can do from another hard drive on this G4 Mac), I have different problems. Firefox does load there (version 3.6.8), and goes to the main html page on the website. When links to the PDF files in that html page are clicked on, a choice between Acrobat Reader 7.0 and Acrobat Reader 9 is offered, but only Reader 7 will open - or claim to open: actually, although the title of the page is correct, all I see is a blank page.
    The PDFs do open in Safari (version 4.1.3) on this G4 booted to OS 11.4.11, and the links in the PDFs are recognized as such, but when I click on them the little Multimedia Player Finder window comes up, telling me I need to download the correct media player, even though Quicktime 7.6.4 is sitting just below on the dock, and opens the identical MOV files with no problem directly from the hard drive itself (actually a different hard drive, but wait...yes, it also opens fine when the MOV is copied to the hard drive on which the currently booted OS10.4.11 resides).
    Okay, so when I click on Get Media Player in that little Multimedia Player Finder window that opens when I try to go to a MOV link, I'm taken to Apple's website, which offers to download Quicktime Player 7.6.9 for Leopard. Drilling down to the appropriate version for Tiger 10.4.11 and downloading that, I find it knows it should install that to the same hard disk on which 10.4.11 resides, forsaking all others. Good. But when I install that and Restart, it's the same story as before: the PDFs load from the website into Safari, but when I click on one of the links in those PDFs to a MOV file I get the same Multimedia Player Finder window saying the media requires an additional player.
    Can anyone shed any light on these problems?
    Thanks in advance for your help.

    >With Perian you just goto System Preferences>Other Row, right click or Control+click on Perian, choose Remove Perian Pref Pane.
    That sounds like Perian is NOT one of those you can just delete. How does one know which is which?
    >But Perian would only help if you want to display the movie in the Browsers.
    In fact, due to issues of publisher's permission regarding about half the video clips, for the present I would prefer the user  NOT to be able to download them, but only to be able to open them in the browser, or even better, in a floating window that's a child of the browser, as I specified to Acrobat, and as in fact happens on my Win 7 PCs.
    >Do you need PDFs to be downloaded, or could you do this in HTML and have the Movie links right on the site?
    I'd rather they NOT be downloaded, at least in the sense of winding up in the Mac's Download folder and opening in a separate window. I want them to open directly in the browser window, as the do in my Win 7. (MOre on this below.)
    As to HTML instead of a PDF, what I need is to be able to provide commentary about each video clip, which HTML could do just fine, and I could get free of the VERY troublesome problem that any time I make more than a trivial change to the text, I must re-link every stinking one of the MOVs in a time-consuming process. So far, however, all of my attempts to show video via the <OBJECT> or <EMBED> tags have either failed, or opened the clip directly in the page, not in a floating window as I prefer. I believe there's a new <VIDEO> (or is it <MEDIA>?)  tag in HTML 5 I may look into.
    > Check System Preferences>Accounts>Login Items window to see if it or something relevant is listed.
    Also look in these if they exist, some are invisible...  /private/var/run/StartupItems; /Library/StartupItems;
    /System/Library/StartupItems; /System/Library/LaunchDaemons; /Library/LaunchDaemons
    Thanks much for this tip. Indeed Protools itself is in the System Preferences>Accounts>Login Items folder, and I'll be removing it from there, but I'll still have the 'In use by another application' problem when I load Protools as a conscious choice. There's a bunch of Digidesign (a.k.a. Protools) stuff in /Library/StartupItems, but ... (I was about to say I would investigate further because Protools is notorious for placing files all over the place and not have a clean uninstall, but I just realized these are StartupItems  - meaning, I suppose, *boot-up* items, as opposed to any time one starts up Protools? If only boot-up, there should be no harm in deleting them.
    >I don't think that is any part of the problem.
    Thank goodness! Just guessing: can I assume that (in principle, at least) any app from a prior OS Applications folder should run in a later OS, but generally not vice versa? That's the default assumption in Windows. However, I know of at least one app I have that was written for OS 9 and they announce does not run in higher OS's, though to be honest I've never tried it.
    >The problem seems to be that the ones that do not display the links, or display the links but won't play it, are looking for the Movie file in the Download folder. No expert, but I kind of think it's some MS "stanrd" involved, which Apple trys to keep pace with, but...
    I'm convinced you have the right answer here  - except perhaps for the Microsoft part, because the 'Cannot play media because file not found' problem also occurs in Foxfire on my two XP PCs (although not in Internet Explorer where everything works properly on those two XP PCs). The evidence that you're right? I noticed an instance - TenFourFox when booted in 10.4, I believe  - where not only the links to the MOV clips have that problem, but also links from within one PDF to another PDF, which generally *were* working in most scenarios tested so far when the MOV clips were not. For what it's worth, the links to the other PDFs specify another folder on the server, while those to the MOV files specify no folder at all since they're all in the same folder as the PDF that links to them. Which is why the Mac assumes they must be in the Download folder. Depending on the situation, apparently, in some circumstances if you do specify a folder Mac figures it must be on the server if not found locally.
    In general, the problem seems to have a lot to do with browser configuration issues, including security, but I don't know what. Perhaps related, perhaps not: Every time I try to load a PDF in TenFourFox it asks me what app to open it with and I have to specify Acrobat Reader. I have found no way to load that as a plug-in (and even if I did, how to tell TenFourFox it should use it). The Get Add-on dialog lets you hunt for plug-ins but neither Acrobat Reader nor Quicktime show up when you ask for them in the Search box.
    But now... guess what?
    Today, suddenly, when I access the site with Safari while booted in 10.5.8, EVERYTHING IS WORKING! All the clips open, and they open in floating windows just like I want. This, remember, is the situation in which the links were not even recognized earlier. I have no idea which if any of the changes we've discussed could have brought this about. I've not even been able to find out how to tell Safari it should be using Acrobat Reader and Quicktime. But somehow, it is! (I'm not making this up, nor, despite my admission of memory lapses on occasion, is this a case of a memory lapse. I described this situation early in my initial post, when I had just verified it.)
    Correct Answer 
    Helpful Answer

  • Error while trying to move file using File adapter

    Hi, I am trying one scenario to move file from one remote folder to other using file adapter as mentioned in heading 4.5.11.1 at http://download.oracle.com/docs/cd/E21764_01/integration.1111/e10231/adptr_file.htm#CHDGFAAB. But I am receiving the below error:
    <messages><input>
    <Invoke1_FileMove_InputVariable><part name="Empty" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><empty xmlns="http://xmlns.oracle.com/pcbpel/adapter/opaque/"/></part></Invoke1_FileMove_InputVariable></input><fault>
    <bpelFault><faultType>0</faultType><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "*JCA Binding execute of Reference operation 'FileMove' failed due to: Exception occured when binding was invoked.*
    *Exception occured during invocation of JCA binding: "*Could not instantiate InteractionSpec oracle.tip.adapter.file.outbound.FileReadInteractionSpec due to: Cannot set JCA WSDL Property.**
    **Error while setting JCA WSDL Property.**
    **Property setSourcePhysicalDirectory is not defined for oracle.tip.adapter.file.outbound.FileReadInteractionSpec**
    **Please verify the spelling of the property.**
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
    </summary></part><part name="detail"><detail>Cannot set JCA WSDL Property.
    Error while setting JCA WSDL Property.
    Property setSourcePhysicalDirectory is not defined for oracle.tip.adapter.file.outbound.FileReadInteractionSpec
    Please verify the spelling of the property.
    </detail></part><part name="code"><code>null</code></part></bindingFault></bpelFault></fault><faultType>
    <message>0</message></faultType></messages>
    Please provide any insight if someone have tried this.
    Thanks,
    rps

    Hi rps,
    Your interaction-spec className seems to be incorrect (FileReadInteractionSpec).
        <interaction-spec className="oracle.tip.adapter.file.outbound.FileIoInteractionSpec">
        </interaction-spec>Please try with the above interaction spec and let me know the outcome.
    Regards,
    Neeraj Sehgal

  • Can't move files - creates alias instead

    When I try to move a file/folder elsewhere, it creates and alias instead of moving the file.
    Yes, the folder I'm working under is in the Applications directory. I understand that this was something new added to 10.7
    The problem is, I'm working with MAMP and my localhost folder (htdocs) is placed by default in Applications/MAMP/htdocs. After developing a site I'm needing to move the files to a new folder on my computer for archives. This seems to work sometimes, but mostly an alias is created.
    How do I get around this issue and successfully move files from my htdocs folder?

    If you hold the Command key down while moving, it will override the "Make Alias" automation and move the file instead. I don't know of any way to turn this "feature" off permanently, unfortunately, so you will have to hold Command each time you want to move a file of any type out of the Applications folder (or sub-folders).

  • Move files and create unique name something wrong with my script

    Can you see where I might be going wrong here?
    Just trying to create a unique name if something exists.
    In English.
    Move file to the destinationFolder
    Item exists in destinationFolder > Move file in the destination folder to the fake Trash > If it exists in fakeTrash too then give it a new name an ending of_a.psd then out it in the trash
    Once thats done move start file to the destination folder.
    Currently when the file exists in the destination folder and in the trash, I get the prompt then the error
    error "System Events got an error: Can’t get disk item \"NN_FR10WW06290PK3LE.psd\"." number -1728 from disk item "NN_FR10WW06290PK3LE.psd"
    set fileMatrix to {¬
              {folderName:"BHS", prefixes:{"BH", "SM", "AL"}}, ¬
              {folderName:"Bu", prefixes:{"BU"}}, ¬
              {folderName:"Da", prefixes:{"ES"}}, ¬
              {folderName:"Di", prefixes:{"DV"}}, ¬
              {folderName:"Do", prefixes:{"DJ", "RA"}}, ¬
              {folderName:"In", prefixes:{"GT", "CC"}}, ¬
              {folderName:"Fr", prefixes:{"FR"}}, ¬
              {folderName:"No", prefixes:{"NN"}}, ¬
              {folderName:"Ma", prefixes:{"MA", "MF", "FI", "MC", "MH", "MB"}}, ¬
              {folderName:"Pr", prefixes:{"PR"}}, ¬
              {folderName:"To", prefixes:{"TM15", "TM11", "TM17"}}, ¬
              {folderName:"Wa", prefixes:{"WA"}}, ¬
              {folderName:"Se", prefixes:{"SE"}}}
    tell application "Finder"
              set theHotFolder to folder "Hal 9000:Users:matthew:Pictures:HotFolderDone"
              set foldericon to folder "Hal 9000:Users:matthew:Pictures:Icons:Rejected Folder Done"
              set fakeTrash to folder "Hal 9000:Users:matthew:FakeTrash"
      ---here
              repeat with matrixItem in fileMatrix -- look for folder
                        set destinationFolder to (folders of desktop whose name starts with folderName of matrixItem)
                        if destinationFolder is not {} then -- found one
                                  set destinationFolder to first item of destinationFolder -- only one destination
                                  set theFolderName to name of destinationFolder
                                  repeat with aPrefix in prefixes of matrixItem -- look for files
                                            set theFiles to (files of theHotFolder whose namestarts with aPrefix) as alias list
                                            if theFiles is not {} then repeat with startFile intheFiles -- move files
                                                      try
      move startFile to destinationFolder
                                                      on error
      activate
                                                                display dialog "File “" & (name ofstartFile) & "” already exists in folder “" & theFolderName & "”. Do you want to replace it?"buttons {"Don't replace", "Replace"} default button 2 with icon 1
                                                                if button returned of result is "Stop"then
                                                                          if (count theLastFolder) is 0 thendelete theLastFolder
                                                                          return
                                                                else if button returned of result is"Replace" then
                                                                          set fileName to get name ofstartFile
                                                                          if exists file fileName indestinationFolder then ¬
                                                                                    try
      --next line moves existing file to the faketrash
      move file fileName of destinationFolder to fakeTrash
      move file startFile to destinationFolder
      --if it already exists in fake trash give it a new name then move that file to fake trash
                                                                                    on error errmess numbererrnum -- oops (should probably check for a specific error number)
                                                                                               log "Error " & errnum& " moving file: " &errmess
                                                                                               set newName to mygetUniqueName(fileName,fakeTrash)
                                                                                               set name of fileNameto "this is a unique name"-- or whatever
                                                                                               set name of fileNameto newName
      --Now move the renamed file to the fake trash
      move file fileName to fakeTrash
      --now move the startfile to destination folder
      move file startFile to destinationFolder
                                                                                    end try
                                                                else -- "Don't replace"
                                                                          if not (exists folder "Hal 9000:Users:matthew:Desktop:Rejected Folder Done") then
                                                                                    set theLastFolder toduplicate foldericonto desktop
                                                                          else
                                                                                    set theLastFolder to folder"Hal 9000:Users:matthew:Desktop:Rejected Folder Done"
                                                                          end if
                                                                          delay 0.5
      move startFile to theLastFolder with replacing
                                                                end if
                                                      end try
                                            end repeat
                                  end repeat
                        end if
              end repeat
              try
                        if (count theLastFolder) is 0 then delete theLastFolder
              end try
    end tell
    to getUniqueName(someFile, someFolder)
         check if someFile exists in someFolder, creating a new unique file name (if needed) by adding a suffix
              parameters -          someFile [mixed]: a source file path
                                  someFolder [mixed]: a folder to check
              returns [list]:          a unique file name and extension
              set {counter, suffixes, divider} to {0, "abcdefghijklmnopqrstuvwxyz", "_"}
              set someFile to someFile as text -- System Events will use both Finder and POSIX text
              tell application "System Events" to tell disk item someFile to set{theName, theExtension} to {name, name extension}
              if theExtension is not "" then set theExtension to "." & theExtension
              set theName to text 1 thru -((length of theExtension) + 1) of theName -- just the name part
              set newName to theName & theExtension
              tell application "System Events" to tell (get name of files of folder(someFolder as text))
                        repeat while it contains newName
                                  set counter to counter + 1 -- hopefully there aren't more than 26 duplicates (numbers are easier)
                                  set newName to theName & divider & (item counter ofsuffixes) & theExtension
                        end repeat
              end tell
              return newName
    end getUniqueName

    There are numerous errors in your script, and it's a large script so there might be more, but these are the standouts for me:
    At line 48 you:
                                                                          set fileName to get name of startFile
    which is fair enough - you then use this to see if the file already exists in the destinationFolder. However, if it does the logic about how to deal with that is flawed.
    At line 56 you catch the error:
                                                                                    on error errmess number errnum -- oops (should probably check for a specific error number)
                                                                                              log "Error " & errnum & " moving file: " & errmess
                                                                                              set newName to my getUniqueName(fileName, fakeTrash)
                                                                                              set name of fileName to "this is a unique name" -- or whatever
                                                                                              set name of fileName to newName
      --Now move the renamed file to the fake trash
      move file fileName to fakeTrash
      --now move the startfile to destination folder
      move file startFile to destinationFolder
                                                                                    end try
    so let's focus on that.
    56: catch the error
    57: log the error
    58: generate a new unique filename
    59: change the name of fileName to some other string
    Hang on, wait a minute.... we already ascertained that at line 48 you defined fileName as a string object that indicates the name of the file. This is just a string. It's no longer associated with the original file... it's just a list of characters. Consequently you cannot set the 'name' of a string, hence your script is doomed to fail.
    Instead, what I think you want to do is set the name of the startFile to the unique string. Files have filenames, and therefore you can set the name.
    You have a similar problem on line 64 where you try to 'move file filename to fakeTrash'. fileName is just a string of characters. It isn't enough to identify a file - let's say the file name is 'some.psd'. You're asking AppleScript to move file some.psd to the trash. The question is which some.psd? The one on the desktop? in your home directory? maybe on the root of the volume? or maybe it should search your drive to find any/all files with that name? nope. None of the above. You can't just reference a file by name without identifying where that file is. So you probably want to 'move file fileName of destinationFolder...'
    There may be other problems, but they're likely to be related - all issues with object classes (e.g. files vs. strings), or not being specific about which object you want.
    As I said before, though, I might be way off - you don't say where the error is triggered to make it easy to narrow down the problem. Usually AppleScript will highlight the line that triggered an error. Knowing what that line is would help a lot.

  • Uploading data to oracle database when a new CSV file arrives to a folder

    Hi,
    I am a student trying to learn oracle and right not working on an academic project. My problem scenario is as follows.
    I have a folder in my system.Whenever a new CSV file is pasted to that folder.The contents should be loaded to database using SQLLoader.The problem I am facing is.
    1) How to schedule this as to what should I write in batch file(for arrival of new file).
    2) How to tell SQL Loader to take contents from the new SQL file everytime an upload is scheduled by the batch file.
    I will be glad for any guidance on this.Thanks :)

    you have to do below steps:
    1. create a sqlloader control file according to your input data file
    2. write a shell script which will check is any new file came in the fiolder. If it came then load the file using above controlfile. once load is complete move file in some other folder.
    3. schedule the shell script using crontab to run every 10 second or so.
    Note: This is just one of the way. there can be many methods to solve above problem including using oracle schduler.

  • HDV video is coming in as document files not movie files. What's up?

    Upon capturing my HDV video footage to my scratch disk - using capture settings that have worked properly in the past, I'm getting not movie files in my capture folder... but DOCUMENT FILES.
    I don't know what's going on. This is the second time this has happened. Can anyone shed light on this? Capture settings are HDV, 1440 x 1280, Apple ProRes 422 (standard). Sequence is set up as Apple Pro Res 422 (standard) as well. I'm using FCPS3.
    I'll pop the tape in, hit log and capture, I get a box that I'll rename the clip in, hit capture and off I go. When the tape comes to the end, I hit escape, check out my clips and bam, document files. This is weird.

    see this thread for answers and solutions:
    http://discussions.apple.com/thread.jspa?threadID=2142286&tstart=150

Maybe you are looking for

  • Struggling with Send XML to client

    Hi, I am using WL Process Integrator 2.1 with WL 6.1. I am trying to do do an example of the "Client Call Addin Response DTD" i.e. pass an XML document to an external java program. As given in docs : http://e-docs.bea.com/wli/docs70/devclient/appa.ht

  • Workspace v1.8 - File Share shows actual time instead of expiration date

    Hi, our customer still uses Workspace Files Version 1.8 an in the main everything works fine. There is just one problem: When he creates a share for a file (not a folder) the expiration date for it should be shown - but in fact the actual time (when

  • Pop up buttons in template?

    yeah , ive had a duplicating issue with the template... figured that out, now, i want to add a DW8 pop up menu to my template and it is greyed out, then we tried to make the button and pop up in an html file and copy it.. copy it and it dosent work ?

  • SNC configuration with JCO

    Hi Experts, I am very new to SNC, and my projects requirement is to configure the SNC between the JCO (A java app using JCO api) and ABAP server. JCO(Java application)---ABAP server Is there any docs or writeup/blog which I can refer to achieve this.

  • Layers disappear when creating a symbol

    Hello, I've created a symbol using several layers, however when I play the composition back, nothing is visibile.  What am I missing?  The symbol is made up of 2 lines that sprint out from another object.