The action "Trim File Names" encountered an error

Get Selected Finder Items
Trim File Names
this simple workflow works ok as a workflow, but when saves as a service it fails. If I run the service inside of Automator it works. Anyone know why this might be failing when ran from the Finder's contextual menu?

copied PHP's substr_replace functionality with this one....
tell application "Finder" to set Sel to selection as alias list
set tRange to text returned of (display dialog "replacement : start : end " default answer "(replacement) : 0 : 0")
set tid to AppleScript's text item delimiters
set AppleScript's text item delimiters to ":"
set tParts to text items of tRange
set AppleScript's text item delimiters to tid
set paramList to every text item of tParts
set numParams to count of tParts
if numParams = 3 then
set startPos to text item 2 of tParts as integer
set rLength to text item 3 of tParts as integer
set toReplace to get text 2 thru ((length of text item 1 of tParts) - 2) of (text item 1 of tParts)
if startPos < 0
repeat with oneFile in Sel
set fInfo to (info for oneFile)
set nExten to name extension of fInfo
set tName to name of fInfo
set beforeExten to (length of tName) - (length of nExten) - 1
if beforeExten + startPos < 0 then
set fInsertPoint to 0
else
set fInsertPoint to beforeExten + startPos
end if
if rLength < 0 then
set fEndPoint to beforeExten + rLength
if fEndPoint < fInsertPoint then
set fEndPoint to fInsertPoint
end if
else
set fEndPoint to (fInsertPoint + rLength)
if fEndPoint > beforeExten then
set fEndPoint to beforeExten
end if
end if
set tNewName to insertReplacement(fInfo, toReplace, fInsertPoint, fEndPoint)
tell application "Finder" to set name of oneFile to tNewName
end repeat
else
repeat with oneFile in Sel
set fInfo to (info for oneFile)
set nExten to name extension of fInfo
set tName to name of fInfo
set beforeExten to (length of tName) - (length of nExten)-1
if startPos > beforeExten then
set fInsertPoint to beforeExten
else
set fInsertPoint to startPos
end if
if rLength < 0 then
set fEndPoint to (beforeExten + rLength)
if fEndPoint < fInsertPoint then
set fEndPoint to fInsertPoint
end if
else
set fEndPoint to (fInsertPoint + rLength)
if fEndPoint > beforeExten then
set fEndPoint to beforeExten
end if
end if
set tNewName to insertReplacement(fInfo, toReplace, fInsertPoint, fEndPoint)
tell application "Finder" to set name of oneFile to tNewName
end repeat
end if
else
display dialog "missing parameters or bad syntax"
end if
to insertReplacement(fInfo, replaceString, startPos, endPos)
set nExten to name extension of fInfo
set tName to name of fInfo
set beforeExten to (length of tName) - (length of nExten)-1
if startPos > 0 then
set beforeChars to get text 1 thru (startPos) of tName
else
set beforeChars to ""
end if
if (endPos < beforeExten) then
set afterChars to get text (endPos + 1) thru (length of tName) of tName
else
set afterChars to "." & nExten
end if
set editedText to beforeChars & replaceString & afterChars
return editedText
end insertReplacement

Similar Messages

  • IMac: I try to save a file and get 'the action "Copy Finder Items" encountered an error.  Check the action's properties and try running the workflow again.'

    I keep on running into this when I try to save a download file. Any help would be appreciated.
    'The action "Copy Finder Items" encountered an error.  Check the action's properties and try running the workflow again.'
    I tried clicking the button to change the save but that has no effect.

    Hi All,
    I am having same issue too.  Can anyone you advise?  Thank you.

  • The action "filter finder items" encountered an error

    I am trying to run an AutoMator script and keep getting this error.   I've read some links on this site, one of which said to open up Spotlight and make sure the file I am trying to open exists.  It does Not.  This is an .indd file (Acrobat Indesign).  It is not in the Spotlight list of apps.  How do I add it?   

    After some more troubleshooting, I figured my problem statement is incorrect. Here is what seems to be the right one:
    I was using 2 filter expressions on the filter action: Extension is mp4 or extension = mkv. This always resulted on the error.
    But when I use only one expression (filer only one file extension) it works fine as long as there is only one file with that extension on the folder being analysed...
    For example, if have 2 mp4 files, I get the error...
    Any hints?
    Thanks.

  • Install iTunes 10.4.1 install error - The Folder Path "File Name" contains an invalid character

    Upgraded computer from XP Prof 32-Bit to Windows 7 Ultimate 64-Bit (Upgrade package, performed Custom Install).
    Attempt to install iTunes 10.4.1 for 64-Bit.  Receiving the following error/problem:
    The Folder Path "File Name on my external drive" contains an invalid character
    I click ok and then get this:
    The Installer encountered errors before iTunes could be configured.  Errors occurred during installation.  Your system could not be modified,  Please run the installer again, or click Finish to exit.
    Any fixes for this?

    Sorry, one of us is not managing to be clear enough.
    Does the message read The Folder Path "File Name on my external drive" contains an invalid character or perhaps The Folder Path "<some path name here>" contains an invalid character?
    If so, then the problem might be just what it says it is with the path name in question... Either way if you list the path given in the error message in a reply to this thread it might provide a clue for anyone tying to help with the problem.
    You could try downloading the installer to C:\iTunesSetup.exe in case that helps.
    tt2

  • TFS Build Error - Exception Message: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters

    I am trying to set-up CI of Orchard CMS and deploy it on Azure using TF service. I am stuck at following error for path being
    longer than 260 characters. However, when counted the total characters in path are 235. Please see the below error :
    Other Errors and Warnings
    1 error(s), 1 warning(s)
    Exception Message: TF400889: The following path contains more than the allowed 259 characters: drop/_PublishedWebsites/Orchard.Web_Package/Archive/Content/C_C/a/src/projects/Orchard/dev/DevAltaf/Orchard/src/Orchard.Web/obj/Debug/Package/PackageTmp/Modules/BrentApart.BannerManager/Scripts/controllers/bannerAssignmentController.js. Specify a shorter path. (type VssServiceException)
    Exception Stack Trace: at Microsoft.TeamFoundation.Build.Workflow.Activities.FileContainerDropProvider.EndCopyDirectory(IAsyncResult result)
    at Microsoft.TeamFoundation.Build.Workflow.Activities.CopyDirectory.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
    at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
    Inner Exception Details:
    Exception Message: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. (type PathTooLongException)
    Did anyone came across such issue while deploying Orchard on Azure with TF service? If yes, how did you sort this freaking error?
    Thanks,
    Altaf B.

    Hi AltafB,
    For your situation, you can short the path for the source code. Or use a short path for build agent folder in your build definition. You can refer to the links below to solve your problem:
    http://blogs.msdn.com/b/aaronhallberg/archive/2007/06/20/team-build-and-260-character-paths.aspx
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/1638a5f0-9321-4ff9-9ee7-6d347badb972/please-some-solution-to-the-specified-path-file-name-or-both-are-too-long?forum=tfsbuild
    Besides, since you deploy Orchard to Azure, you can also publish it directly using publish profile in Visual Stduio or WebMatrix directly.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • SharePoint 2010, Visual Studio 2010, Packaging a solution - The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

    Hi,
    I have a solution that used to contain one SharePoint 2010 project. The project is named along the following lines:
    <Company>.<Product>.SharePoint - let's call it Project1 for future reference. It contains a number of features which have been named according
    to their purpose, some are reasonably long and the paths fairly deep. As far as I am concerned we are using sensible namespaces and these reflect our company policy of "doing things properly".
    I first encountered the following error message when packaging the aforementioned SharePoint project into a wsp:
    "The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters."
    I went through a great deal of pain in trying to rename the project, shorten feature names and namespaces etc... until I got it working. I then went about gradually
    renaming everything until eventually I had what I started with, and it all worked. So I was none the wiser...not ideal, but I needed to get on and had tight delivery timelines.
    Recently we wanted to add another SharePoint project so that we could move some of our core functinality out into a separate SharePoint solution - e.g. custom workflow
    error logging. So we created another project in Visual Studio called:
    <Company>.<Product>.SharePoint.<Subsystem> - let's call it Project2 for future reference
    And this is when the error has come back and bitten me! The scenario is now as follows:
    1. project1 packages and deploys successfully with long feature names and deep paths.
    2. project2 does not package and has no features in it at all. The project2 name is 13 characters longer than project1
    I am convinced this is a bug with Visual Studio and/or the Package MSBuild target. Why? Let me explain my findings so far:
    1. By doing the following I can get project2 to package
    In Visual Studio 2010 show all files of project2, delete the obj, bin, pkg, pkgobj folders.
    Clean the solution
    Shut down Visual Studio 2010
    Open Visual Studio 2010
    Rebuild the solution
    Package the project2
    et voila the package is generated!
    This demonstrates that the package error message is in fact inaccurate and that it can create the package, it just needs a little help, since Visual Studio seems to
    no longer be hanging onto something.
    Clearly this is fine for a small time project, but try doing this in an environment where we use Continuous Integration, Unit Testing and automatic deployment of SharePoint
    solutions on a Build Server using automated builds.
    2. I have created another project3 which has a ludicrously long name, this packages fine and also has no features contained within it.
    3. I have looked at the length of the path under the pkg folder for project1 and it is large in comparison to the one that is generated for project2, that is when it
    does successfully package using the method outlined in 1. above. This is strange since project1 packages and project2 does not.
    4. If I attempt to add project2 to my command line build using MSBuild then it fails to package and when I then open up Visual Studio and attempt to package project2
    from the Visual Studio UI then it fails with the path too long error message, until I go through the steps outlined in 1. above to get it to package.
    5. DebugView shows nothing useful during the build and packaging of the project.
    6. The error seems to occur in
    CreateSharePointProjectService target called at line 365 of
    Microsoft.VisualStudio.SharePoint.targetsCurrently I am at a loss to work out why this is happening? My next task is to delete
    project2 completely and recreate it and introduce it into my Visual Studio solution.
    Microsoft, can you confirm whether this is a known issue and whether others have encountered this issue? Is it resolved in a hotfix?
    Anybody else, can you confirm whether you have come up with a solution to this issue? When I mean a solution I mean one that does not mean that I have to rename my namespaces,
    project etc... and is actually workable in a meaningful Visual Studio solution.

    Hi
    Yes, I thought I had fixed this my moving my solution from the usual documents  to
    c:\v2010\projectsOverflow\DetailedProjectTimeline
    This builds ok, but when I come to package I get the lovely error:
    Error 2 The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. C:\VS2010\ProjectsOverflow\DetailedProjectTimeline\VisualDetailedProjectTimelineWebPart\Features\Feature1\Feature1.feature VisualDetailedProjectTimeline
    Now, the error seems to be related to 
    Can anyone suggest what might be causing this. Probably some path in an XML file somewhere. Here is my prime suspect!
    <metaData>
    <type name="VisualDetailedProjectTimelineWebPart.VisualProjectTimelineWebPart.VisualProjectTimeline, $SharePoint.Project.AssemblyFullName$" />
    <importErrorMessage>$Resources:core,ImportErrorMessage;</importErrorMessage>
    </metaData>
    <data>
    <properties>
    <property name="Title" type="string">VisualProjectTimelineWebPart</property>
    <property name="Description" type="string">My Visual WebPart</property>
    </properties>
    </data>
    </webPart>
    </webParts>
    .... Unless I can solve this I will have to remove the project and recreate but with simple paths. Tho I will be none the wiser if I come across this again.
    Daniel

  • Re Trim file name scripts in SL

    Below is a frozen, unanswered conversation regarding the missing finder scripts in SL. Luckily, I make a complete backup before converting, so I still have all the old Leopard scripts. Norwichfan, I feel your pain, and I thought that archiving your thread without an adequate answer was wrong.
    Here's your answer. you can just get a copy of the old finder scripts, put them in /Library/Scripts and they'll show up in your script menu as before. I have zipped up a copy of them and posted them here:
    http://tedward.org/finder_scripts.zip
    norwichfan88
    Posts: 12
    From: Australia
    Registered: Mar 25, 2010
    Trim file name scripts in SL
    Posted: Mar 26, 2010 6:26 PM
    I have recently upgraded to SL and have found that the trim/add to file name applescripts from leopard are missing from my scripts menu.
    Is there a place I can find these for SL?
    MBP mid-2009 Mac OS X (10.6.2)
    Pierre L.
    Posts: 824
    From: Québec
    Registered: Jan 26, 2009
    Re: Trim file name scripts in SL
    Posted: Mar 26, 2010 6:49 PM in response to: norwichfan88
    Solved
    Maybe something similar in this web page?
    15-inch MacBook Pro 2.53 GHz Mac OS X (10.6.2) AirPort Extreme
    norwichfan88
    Posts: 12
    From: Australia
    Registered: Mar 25, 2010
    Re: Trim file name scripts in SL
    Posted: Apr 10, 2010 12:03 AM in response to: Pierre L.
    Thanks for the web page, had a look but not having done any work with applescript or other programming language was a bit over my head.
    I decided to make a temporary solution with and automator action.
    MBP mid-2009 Mac OS X (10.6.2)

    Thanks for the web page, had a look but not having done any work with applescript or other programming language was a bit over my head.
    I decided to make a temporary solution with and automator action.

  • Get-ChildItem : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

    Hi, Im trying to get the whole path in my server, so i tried that with this following code
    Get-ChildItem $sourceFolder  -Recurse | ?{$_.PsIsContainer} |Get-Acl
    But then, it showed me somtehing like this :
    Get-ChildItem : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
     I tried to find the solver everywhere and mostly they propose to change the path name, which is impossible, since I am working with my company server, and those folder have already there before i start to work here, then the other ask me to use robocopy,
    but all of the trick just dont work
    is there any way to solve this problem? thanks

    There is no simple solution to this. And it is not a limitation of powershell itself, but of the underlying NTFS file system.
    If the problem is that a folder with a name longer than 248 exists anywhere within your directory structure, you are hooped.
    If the problem is that some fully qualified path names exceed 260 characters, then, in those cases, the solution already given is to create a psdrive partway up the path from the drive letter or server/share root of the path. Unfortunately, the output produced
    will be relative to that psdrive and not to what is specified as the $sourcefolder.
    unless you already know where those problematic paths are, you might consider trying to trap those errors and have your script figure out where it needs to create psdrives. You might then be able to calculate the equivalent path for each file or folder and
    output that. the programming effort would be simpler to just created a psdrive for each folder encountered, however I expect that would be very inefficient.
    Al Dunbar -- remember to 'mark or propose as answer' or 'vote as helpful' as appropriate.

  • " the volume for (file name) cannot be found. Insert the disk or connect to the server volume and wait for it to appear on the desktop, then try again."

    I get an error message in iPhoto when I click on thumbnails of pictures in certain albums. It reads 'the volume for "(file name)" cannot be found. Insert the disk or connect to the server volume and wait for it to appear on the desktop, then try again.'  What does this mean and how do I fix it?

    It means that you imported the files in Referenced mode and have now remvoed them from the Mac. Put the disk or card back.
    For more on iPhoto and file management see this User Tip:
    https://discussions.apple.com/docs/DOC-6361

  • Powershell Get-childItem: The specified path, file name, or both are too long.

    Hey Scriping Guys!
    I've been using a PowerShell script for a couple of years now to generate a monthly report showing the size of user folders on a number of departmental file servers.  It's working just fine on all file servers except one where the users have gotten carried away with creating sub-folders and using realy long descriptive file names.  The problem piece of script is this:
    $colItems = (Get-ChildItem \\192.168.10.5\marketing -recurse | Measure-Object -property length -sum)
    "marketing-serv\marketing: "+"{0:N2}" -f ($colItems.sum / 1GB) + " GB"
    The reply I get is:
    Get-ChildItem : The specified path, file name, or both are too long. The fully
    qualified file name must be less than 260 characters, and the directory name mu
    st be less than 248 characters.
    At G:\data\Server_space_Report\serverspace2.ps1:37 char:27
    + $colItems = (Get-ChildItem  <<<< \\192.168.10.5\marketing -recurse | Measure-Obje
    ct -property length -sum)
    Yes, the message is correct, however, when I connect to the server, right click the folder and chose properties it returns a size of 128 GB.  My questions are
    1. Why does clicking on folder properties not produce an error (what is it doing differently from my script)?
    2. How can I fix my script?
    Thanks,

    I am trying to clear up the older open posts on this forum. If this is still an unresolved issue for you please let me know. If you do not post back within one week I will assume it is resolved and will close this thread.
    Thank you
    Ed Wilson
    Microsoft Scripting Guy

  • The SkillSoft Course Player has encountered an error while communicating wi

    HI Friends ,
    I am getting following error while launching a SCORM Course from Learner sel service :
    Error ::
    ===
    The SkillSoft Course Player has encountered an error while communicating with the Learning Management System. As a result, your session will now be closed.
    =================================================================================================..
    Please do let me know how we can resolve this issue ..
    Thanks in advance ..
    Regards
    Vicky

    Hi Lee ,
    Thanks for your response .
    1. yes the courses are scormn courses . I generated PIF files through installer.exe given by the vendor and imported to the LO.and then created offering and class. So when employee lanunches the course for learner self service i am getting this error
    2.Even i have done borwser compabilty test.please the below output :
    SkillSoft Browser Capabilities Check.
    Your browser results have been saved to our server and can be accessed for the next 30 days using this URL.
    http://browser.skillport.com/bh/results.asp?resultsid=%7BFE8831C3%2D74EA%2D475D%2DAF1D%2D8B4D70CE609B%7D
    User Details.
    Your e-mail [email protected]
    IP Address 168.187.81.162
    Approximate Connection Speed 68,109 kbps
    Date and Time of Test 19 Apr 2011 02:08:59
    Proxy Via 1.1 webwasher (Webwasher 6.8.7.9396), 1.1 j5k-tec-69 (jaguar/3.0-11)
    Combined Technical Specifications (20110114) This test checks compatibility for a combined specification of SkillSoft Course Player, Simulation Player and SkillPort
    Test Operating System
    Result Pass
    Your Computer Microsoft Windows XP
    Test Browser Type
    Result Pass
    Your Computer Internet Explorer
    Test Browser Version
    Result Pass
    Your Computer 7.0
    Test Adobe Flash
    Result Pass
    Your Computer 10.0.22.87
    Test Java Environment
    Result Pass
    Your Computer Sun Microsystems Inc.
    Version 6.0 Update 18 (1.6.0_18)
    Test PopUp Blocker
    Result Pass
    Your Computer No PopUp Blocker Detected.
    Access a SkillSoft Support Representative in a one to one chat environment using our Live Help.
    http://support.skillsoft.com/livehelp/browsertest.asp?resultsid=%7BFE8831C3%2D74EA%2D475D%2DAF1D%2D8B4D70CE609B%7D&customerid=%7B293C989F%2DAA78%2D4D7E%2DA66C%2D0E2BDC6CBC07%7D&[email protected]
    The SkillSoft Online Customer Support Portal is a gateway to the latest technical support and how to information. Users can search technical support articles, view a list of FAQs or submit requests to SkillSoft Customer Service Representatives through an intuitive, easy to use Web form.
    http://onlinesupport.skillsoft.com
    ..please do let me know how i can resolve this issue
    Regards
    Vicky

  • [Anyconnect 3.0] "The VPN client driver has encountered an error"

    Hi,
    A computer get the following error when trying to connect: "The VPN client driver has encountered an error."
    In setupapi.log, we got this error:
    #-147 Loading class installer module for "Cisco AnyConnect VPN Virtual Miniport Adapter for Windows".
    #E358 An unsigned or incorrectly signed file "C:\WINDOWS\system32\NetCfgx.dll" for driver "Cisco AnyConnect VPN Virtual Miniport Adapter for Windows" blocked (server install). Error 0x800b0100: No signature was present in the subject.
    #E161 Processing of call to class installer failed. Error 0x800b0100:
    No signature was present in the subject.
    I already tried those solutions :
    - install this fix http://support.microsoft.com/kb/822798
    - repair catalog system http://www.cisco.com/en/US/products/ps6120/products_tech_note09186a00809b4754.shtml#asdqw
    Do you know a solution?
    Thanks for your help,
    Patrick

    Kashish,
    The user who got this problem solved it by replacing C:\WINDOWS\system32\NetCfgx.dll by another NetCfgx.dll file.
    He downloaded it from Internet (users don't fear )) but I would advice you to pick one from another computer...
    I think that his computer was corrupted...
    HTH
    Patrick

  • The Internal Concurrent Manager has encountered an error.

    Routine &ROUTINE has attempted to start the internal concurrent manager. The ICM is already running. Contact you system administrator for further assistance.afpdlrq received an unsuccessful result from PL/SQL procedure or function FND_DCP.Request_Session_Lock.
    Routine FND_DCP.REQUEST_SESSION_LOCK received a result code of 1 from the call to DBMS_LOCK.Request.
    Possible DBMS_LOCK.Request resultCall to establish_icm failed
    The Internal Concurrent Manager has encountered an error.
    Review concurrent manager log file for more detailed information. : 06-JUN-2012 00:51:22 -
    Shutting down Internal Concurrent Manager : 06-JUN-2012 00:51:22
    List of errors encountered:
    _ 1 _
    Routine AFPCSQ encountered an ORACLE error. .
    Review your error messages for the cause of the error. (=<POINTER>)
    List of errors encountered:
    _ 1 _
    Routine AFPCAL received failure code while parsing or running your
    concurrent program CPMGR
    Review your concurrent request log file for more detailed information.
    Make sure you are passing arguments in the correct format.
    The PPD_0606@PPD internal concurrent manager has terminated with status 1 - giving up.
    Edited by: sahil jain on Jun 6, 2012 10:10 PM

    Hi;
    1. What is EBS version?
    2. Did you check:
    Concurrent Managers Will Only Start on One Node in PCP/RAC Environment [ID 264296.1]
    Concurrent Processing - The Concurrent Manager Fails to Start on GSM Enabled Due to DBMS_LOCK.Request ResultCall Failed to Establish ICM [ID 245563.1]
    Regard
    Helios

  • Can we change the web.xml file name???????

    can we change the name web.xml and struts-config.xml file to other name.....if yes, then how..........

    you can change the name of struts-congig.xml file
    and change the strut-config file name in web.xml also.
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
        <servlet>
            <servlet-name>action</servlet-name>
            <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
            <init-param>
                <param-name>config</param-name>
                <param-value>/WEB-INF/struts-config.xml</param-value>
            </init-param>And you also try rename the file web.xml and run the application and check what is happening...

  • How to copy the photo with file name at window 7 and search specific one in iphone 4s?

    How to copy the photo with file name at window 7 and search specific one in iphone 4s?

    Clendenen02 wrote:
    2) It would be equally helpful if there was something that would take the name of the picture file and spotlight comment, copy and paste it to a movie file's comments with the same name but obviously has different extention. For an example
    In a Pictures folder
    Name: Dark Knight, The.jpeg       Comment: (2008) Genre: Action...             <- copy comment
    In a Movie Folder
    Name: Dark Knight, The.m4v       Comment:                                               <- paste 
    and do this for all 700 files
    This Bash script will do it.
    Edit "PicDir" and "MovDir" to the location of your Folders
    (Note: The comment is written to the m4v file using xattr, so the Spotlight comment field appears blank in Finder, but the comment metadata is still indexed by Spotlight (If you add a Spotlight comment from Finder, it is stored both as an extended attribute and in a .DS_Store file)
    #!/bin/bash
    PicDir=$HOME/Desktop/Pictures
    MovDir=$HOME/Desktop/Movies
    for f in $PicDir/*
    do
         if [ ! -d "$f" -a "${f##*.}" == "jpeg" ]; then
              comment=$(mdls -raw -name kMDItemFinderComment "$f")
              if [[ $comment != "(null)" ]]; then
                   picname=${f##*/}
                   movname=${picname%.*}.m4v
                   if [ -e "$MovDir"/$movname ]; then
                         xattr -w com.apple.metadata:kMDItemFinderComment "\"$comment\"" "$MovDir"/$movname
                   fi
              fi
         fi
    done

Maybe you are looking for

  • IPad & IPhone 4s Air print Issue

    I have just bought a HP 6520, I''ve followed the instructions for the Printer, My MAC Pro works but then I hard wired it and installed the software with a Disc. This all works fine. I've tried to print from my ipad 2 and Iphone 4s but it's unable to

  • Error code: 0xe8000084

    My iPhone 4 is having problem connecting to itune store, I am using windows 8.1 64bit and have 2 high speed USB ports. The phone beeps when I connect the USB and the charging starts and stops with the beep. Please help

  • [SOLVED] Terminator stopped working Unable to start shell:/bin/bash

    Hello, I just wanted to share as I didn't found anything about it, Since yesterday I can't launch my favorite terminal emulator which is terminator, it gives me : Unable to start shell:/bin/bash displayed in terminator window where I'm supposed to ty

  • Need lan driver for windows 7 32 bit

    I need lan driver for the product name i enter above and that must be support in windows 7 32 bit please help me as soon as possible.. Thanks

  • Replace every empty space the beginning and the end

    Hi All. I want to use get-content and -replace to replace empty spaces: The text file Line1:abcd Line2:cdef        Line3:jukq Line4:casdj