Preserve Aliases when move files to different drive

I have several folders and files that I want to move from my laptop's internal hard drive to an external hard drive. I also have several aliases for these files that I want to KEEP on the internal drive. Is there any way to MOVE the folders and files to the external hard drive while preserving the aliases, so that when I click on the laptop aliases they will open the external hard drive files? I already found a discussion that shows how to MOVE files to the external drive as apposed to copying, but when I did it (using command drag), the alias residing on my laptop no longer worked.

Hi,
These scripts work, if the filename contains always three
words separated by a space, otherwise the file will not be moved.
The script will overwrite files that already exists in the destination folder.
Here's the script that uses a shell
set theFolder to "" -- drag/drop your folder between quotes
set destination to "" -- drag/drop the folder "folder importen letters" between quotes
do shell script "dest=" & (quoted form of destination) & "
/usr/bin/find " & (quoted form of theFolder) & " -type f -maxdepth 1 \! -name '.*' -print0 | while read -d $'\0' f; do
name=${f##*/}; folderName=${name%% *}; year=${name##* };
if [[ "$year" = . ]]; then year=${year%%.*};fi
if [ -d "$dest/$folderName/$year" ];then
/bin/mv -f "$f" "$dest/$folderName/$year/$name"
fi
done"
or this script if you prefer the Finder
set theFolder to (POSIX file "") as string -- drag/drop your folder between quotes
set destination to (POSIX file "") as alias -- drag/drop the folder "folder importen letters" between quotes
tell application "Finder"
repeat with tFile in (get files in folder theFolder)
set {folderName, t_year} to my getTheseNames(name of tFile)
if t_year is not "" then try
move tFile to folder t_year of folder folderName of destination with replacing
delete tFile -- because the command move, doesn't move on other volume, it duplicate
end try
end repeat
end tell
on getTheseNames(tname)
set oldTID to text item delimiters
set text item delimiters to " "
try
tell tname to set {t_base, t_end} to {text item 1, text item 3}
set text item delimiters to "."
set t_end to text item 1 of t_end -- text before the period = the year
on error
return {"", ""}
end try
set text item delimiters to oldTID
return {t_base, t_end}
end getTheseNames

Similar Messages

  • Lockups when accessing files on other drives

    I have 845PE Neo2, with most up to date drives and bios.  Just built.  Have 4 hard drives, 2 of which are on the raid channel.  When accessing files on any other drive aside from C: the system will lock up.  For example, I have mulitple movie files on one drive.  If i look though and watch about 10 or 15 of them, the entire system will lock.  Can't move mouse, no CTRL, ALT, Delete.  Only fix is to reboot.  RAM (2 sticks of 512 DDR 2700), CPU Intel 3.0 800FSB), and hard drives(120gig WD special edition, 120 gig maxtor, 60 gig Maxtor, 80 gig WD, ATI 9800 Pro, 6 system fans.) have all worked before with no problem.  Only thing new is MB.  I have reinstalled windows XP Pro with new MOBO.  Any idea what could be causing this or do i possibly have a bad board.  I have bios set to default settings.
    P.S. - another funny thing is that when i boot Star Wars galaxies, it says there are 2 processors and my video card is 117 megs.  Very strange.  Please help!

    Yes, I believe 32 Bit is enabled by defualt
    VGA card = ATI Radeon 9800 Pro 128MB
    ((what psu in detail,max amps 3.3 5 and 12v
    how much cpu is being used as you are doing this by device manager )))??? where do i get this info?
    120 Gig maxtor ide1 master(top of cable) jumper
    120 gig WD special edition ide1 slave (middle of cable) jumper
    80 gig WD ide3 master jumper top of chain  (not using raid, but have it as 1+0 strip)
    60 gig Maxtor slave jumper middle of chain (not using raid, but have it as 1+0 strip)
    The hard drive configuration is exact same as I had in my soyo dragon.  Not one difference.  I had no problems with that.

  • Add a DB2 database file in different drive

    Dear all,
    I would like to add a DB2 database file in different drive which is added recently.
    eg: existing DB folders in drive H, now we need to add new data folder from drive J
    please help me on this step by step procedure, looking for the earliest reply
    regards
    sathish
    65 96724662

    Hi,
    what you have to do is to extend your tablespace with new containers on the new drive and AVOID REBALANCING !!!
    Do do that, you can either use the "alter tablespace" command with the "begin new stripe set" clause, or use
    the DBACOCKPIT to extend your tablespace and specify
    a new stripe set there.
    For details on the "alter tablespace" command see:
    http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.doc/welcome.htm
    and search for "alter tablespace"
    kind regards
    Thomas

  • What is error code 0? Trying to copy a pro res.mov file to thumb drive connected to Mac Book Pro (2010 vintage).

    What is error code 0? Trying to copy a pro res.mov file to thumb drive connected to Mac Book Pro (2010 vintage).

    Problem solved! Thanks roam.

  • Best way to move files to external drive in LR 5. Drag and drop or export, if drag and drop

    Best way to move files to external drive in LR 5. Drag and drop or export, if drag and drop can I put all the dated folders into one single folder

    Drag and drop should do the job. Or move the files (or folders) in your operating system and then re-link via http://www.computer-darkroom.com/lr2_find_folder/find-folder.htm
    Yes, you can put all the dated folders into a single folder (but if you plan to do this, then don't try move the files using your operating system and re-link)
    Export most definitely isn't the solution.

  • Will changing location for Itunes Apps and Music files to different drive (from dive C: to drive E:)now effect how they work. And will Itunes be able to find them, when I do a sync?

    Will changing the location of folders effect how my Itunes will run? As I am runnig out of room fast on my C drive. And have almost a 1 terrabyte of room on the drive I want it to all to go to. I was thinking of just cutting and pasting.

    WpgGizmo wrote:
    Will changing the location of folders effect how my Itunes will run
    No, but do not simply move files around else you will have a lot of grief...
    Do NOT move files then change iTunes prefs to a new location as this will not work.
    Quit iTunes.
    Copy your entire /Music/iTunes/ folder (and everything inside it) on your C: drive to the E: drive.
    Hold Shift and launch iTunes.
    Select Choose library and select the iTunes folder you copied to the E: drive.
    That is all you need to do. You do not need to change any other settings.

  • 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.

  • What is the best way to move files to different folders in a plug-in?

    I am writing a plug-in that needs to move files on the hard drive.  I am using LrFileUtils.move(from, to) and everything is fine except that the catalog is not updated when the file is moved.  After the plug-in runs I can use Library > Synchronize Folder to get the catalog back in sync with the new locations of the photos on the drive, but this manual step is less than ideal. 
    I am unable to find a way to move the files within the plug in that also updates the catalog (like dragging photos to a new location within the LR Navigator pane).  Lacking an API for this, I looked for a way to programmatic execute the Synchronize Folder menu item, but was not able to find this either..
    Can anyone recommend a better way to move photos to different folders within a plug-in that also updates the catalog?

    Hi Andy,
    There are 3 main file formats that you can consider writing your data out to in LabVIEW:
    ASCII
    Binary
    Datalog
    ASCII
    ASCII files are useful because every operating system and almost every application can read/write ASCII format files. Use ASCII files when:
    Other users or applications will need to access the data file.
    You will not need to perform random access file I/O
    File I/O speed is not crucial
    Disk space is not crucial
    Examples within LabVIEW Example Finder: Fundamentals >> File Input and Output >> Write to Text File.vi and Read from Text File.vi
    Binary
    Binary byte stream files are more specific to data storage and retrieval. Use b
    inary files when:
    File I/O will remain in LabVIEW only -- no other applications will be needing to write/read that file. There is no standard formatting for binary files and thus other applications or operating systems may be unable to read the file.
    Files are smaller than ASCII files
    Easier and faster random access to data
    Examples within LabVIEW Example Finder: Fundamentals >> File Input and Output >> Write Binary File.vi and Read Binary File.vi
    Datalog
    When to use datalog:
    If you need to record data with a mixture of types, it can be cumbersome to convert everything to ASCII or to keep track of the binary formatting.
    Datalog format is binary and internal to LabVIEW, so again only use this format if no other applications or operating systems will be needing to perform file I/O on the file.
    Examples within LabVIEW Example Finder: Fundamentals >> File Input and Output >> Write Datalog File
    Example.vi and Read Datalog File Example.vi
    Good luck!
    Kileen C.
    Applications Engineer
    National Instruments

  • Aliases of movie files in ~Movies/ for Front Row usage

    Hi everyone.
    In the first place I apologise for my bad English.
    I want one applescript for folder action wich will make an aliases of all movie files (.mov, .avi, .mpeg, .mpeg, .divx ,etc.) in freshly mounted CD/DVD/HD in ~Movies/ folder because I want to play those files in Front Row.
    Another Script is needed for deleting unwanted aliases upon unmounting that CD/DVD/HD.
    I figured out that all CD/DVD/HD are mounted in /Volumes folder, and I created such two scripts:
    On mounting drive:
    on adding folder items to this_folder after receiving these_items
    try
    tell application "Finder"
    make new alias file to these_items at "Macintosh HD:Users:USERNAME:Movies:" with properties {name:"Movie"}
    end tell
    end try
    end adding folder items to
    On unmounting drive:
    on removing folder items from this_folder after losing these_items
    try
    tell application "Finder"
    delete alias file "Macintosh HD:Users:USERNAME:Movies:Movie"
    end tell
    end try
    end removing folder items from
    I attached those two scripts as /Volumes folder action and they are working good, but there is a problem.
    When I mount CD, and then when I connect my iPod, alias of CD is moving to trash and new alias to iPod is created with same name. Also, when I connect iPod, and then CD and then I disconnect iPod alias to CD is moving to trash. ****, that's not quite what I am looking for.
    Apparently I have and idea, but I lack experience with applescript.
    Creating alias script should work like that:
    on mounting drive in filesystem
    1) Scanning about 2 levels for QT supported files
    2) Making alias to each movie file in those 2 levels in ~Movies/
    3) Adding constant Spotlight comment (for alias removing purposes in other script) to those alias files in ~Movies/
    Removing unwanted Aliases:
    on unmounting drive from filesystem
    1) Scanning ~Movies/ For alias files with constant spotlight comment
    2) removing those alias files (moving to trash preferably, for security purposes)
    This way script would make only good aliases, and there could be multiple drives mounting into system. Apparently, after unmounting any drive aliases with constant spotlight comment will be moved to trash, but I don't have any idea for that.
    Can someone help me?

    Hello imrik,
    Firstly, I don't use OSX myself, so the rest of this post is based upon my experience under OS9 and some knowledge from OSX documentations, etc.
    Folder Actions suite (terms for Folder Action's handler) is defined in StandardAdditions.osax, that is located at (probably):
    /Library/ScriptingAdditions/StandardAdditions.osax
    In brief, the dictionary states (under OS9):
    on adding folder items to fda after receiving aa
    -- fda is alias of the folder that receives new item(s)
    -- aa is list of aliase(s) the folder fda received
    end adding folder items to
    on removing folder items from fda after losing nn
    -- fda is alias of the folder that loses item(s)
    -- nn is list of aliase(s) or list of item name(s) the folder fda loses.
    end removing folder items from
    * Open the dictionary of the OSAX in Script Editor for more details.
    As far as I can tell (under OS9.1, AS1.8.3), 'removing folder items' handler always provides list of names that the folder loses, in spite of the description in OSAX dicitonary.
    I don't know the reason why 'removing folder items' handler provides {} in 'after losing' argument in your environment. It should provide list of names of unmounted volumes (unless '/Volumes/' directory is something so special as to deceive Folder Action Server in some way.)
    (Possibly your method to check the handler's arguments is not appropriate.)
    If you want to check the class of value/object in AppleScript, the proper way is to use a code such as SCRIPT1:
    -- SCRIPT1
    set x to (path to desktop) -- alias
    --set x to {1,2,3} -- list
    set c to class of x
    display dialog ("" & c) -- this will show class name string of x.
    return c -- this will return class of x in result window (when run in Script Editor).
    -- END OF SCRIPT1
    And to check the contents of value/object, you may try SCRIPT2 (for AppleScript's native value/object):
    -- SCRIPT2
    -- in target script (run in e.g. Applet or Folder Actions)
    set x to {1, 2, 3}
    tell application (path to frontmost application as text)
    activate
    set the clipboard to x
    end tell
    -- in checker script (run in Script Editor)
    set y to the clipboard
    return y -- y is given in result window of Script Editor.
    -- END OF SCRIPT2
    So as a whole, you may try something like SCRIPT3 as your test Folder Action and SCRIPT3A as its corresponding checker:
    -- SCRIPT3
    on adding folder items to fda after receiving aa
    tell application (path to frontmost application as text)
    activate
    set the clipboard to {fda, aa}
    display dialog ("" & (class of aa) & return & (class of (aa's item 1)))
    end tell
    end adding folder items to
    on removing folder items from fda after losing nn
    tell application (path to frontmost application as text)
    activate
    set the clipboard to {fda, nn}
    display dialog ("" & (class of nn) & return & (class of (nn's item 1)))
    end tell
    end removing folder items from
    -- END OF SCRIPT3
    -- SCRIPT3A (to be run in Script Editor)
    set y to the clipboard
    return y -- clipboard contents is displayed in result window of Script Editor.
    -- END OF SCRIPT3A
    That's all for now.
    Good luck,
    H
      Mac OS 9.1.x  

  • Error code -36 when copying files to certain drives

    I want to back up my Aperture Library. I have two external fire wire drives that give me this error:
    The Finder cannot complete the operation because some of the data in Aperture Library could not be read or written. (Error code -36)
    I don't get the error when copying to my Drobo, so I believe this problem is only related to my two fire wire drives. I reformatted one of them using Disk Utility, same problem.

    Today I had the same thing happen. I was copying some large (2gb+) video files from a USB2 FAT32 external drive to my other Mac formatted external drives, first time to a firewire 400 and then tried to a USB2. At about 750mb, the transfer stopped and the EXACT same dialog box appeared.
    I ran Disk Utility on the source drive USB2 FAT32 to fix drive errors. No improvement.
    As I've had issues under SL with my optical FW DVD drives (see that thread for details), I thought may be my FW drives don't like FAT32. So I tried the Mac USB2 drive. Not working either.
    Finally, I realized I was routing the FAT32 drive into a cheap unpowered 4 port USB hub (Genesys Logic, Inc. chipset). So I unplugged the hub from the Mac Mini and inserted the FAT32 drive directly into the Mac Mini. Tada! Success was at hand. No problems transferring to either FW or USB drives.
    So this tells me there is something flaky about some devices and how they are hooked up. That is the drives and files are OK. It is Snow Leopard that has the bug.
    Mike, if you are still having problems and are comfortable using Unix CL, you may be able to use the DD command (so called "Data Dump") to transfer. This is a very robust method to transfer files and permits resumption if a transfer has died midstream. It can even transfer real corrupt files off of damaged disk drives regardless of drive format. I used DD successfully to move files off an eMac that had random hardware crashes (due to faulty counterfeit capacitors) that were interrupting the transfer.
    ~Frank

  • Using Automator and Applescript to search and move files to flash drive

    I've used applescript and automator to do simple tasks like watch folders and move files and rename files, but that is about the extent. I am wondering if it is possible to set up a automator service or app that will do several things.
    When a flash drive is plugged it, it will ask for a file to be searched for, then it will search a predetermined directory for files with the word or number in them and then it will copy the found files to the mounted flash drive.
    Any help would be greatly appriciated!
    Thanks!

    As a start, you can use launchd to run a script when a volume is mounted:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
              <key>Label</key>
              <string>com.tonyt.LaunchOnVolMount</string>
              <key>ProgramArguments</key>
              <array>
                        <string>LaunchOnVolMount.sh</string>
              </array>
              <key>QueueDirectories</key>
              <array/>
              <key>StartOnMount</key>
              <true/>
              <key>WatchPaths</key>
              <array/>
    </dict>
    </plist>
    You can then have the LaunchOnVolMount.sh script perform the tasks you need.
    You can incorporate Applescript within the Bash script with osascript:
    #!/bin/bash
    answer=$( osascript -e 'tell app "System Events" to display dialog "What file do you want to search for?" default answer "" ' )
    echo $answer
    I beleive that you can also call an Applescript from launchd

  • QuickTime 7.3 \ Vista - MOV files gives display driver error

    I am running:
    Vista Ultimate
    QuickTime 7.3
    QuicktimePlayer 7.3
    Intel(R) 82945G Express Chipset Family
    Driver Date: 8/24/2007
    Version: 7.14.10.1322
    When playing .MOV file, as soon as the movie starts, the entire screen goes black with the following error message:
    Display driver stopped responding and has recovered
    Display driver igfx stopped responding and has successfully recovered
    Then the screen in OuickTime widow goes black and Quicktime won't play anything until you stop and restart QuickTime.
    This was a brand new install with no previous versions of QuickTime or iTune installed.

    Try using the QuickTime Control Panel / Advanced tab and "Safe mode" and see if things improve.
    Quit and relaunch QuickTime after making those changes.

  • Windows 8.1 Explorer crashing when .mov files hovered over

    I have today (Jan 6, 2015) copied over to my PC some.mov files from my iPhone and as soon as they are hovered over in Explorer, Explorer crashes and so does the software I am trying to import them to. Is there any workaround?  Or should I leave things
    as they are until Microsoft provide a fix?

    Hi,
    How large are the files you want to copy? What is the result if you copy a smaller file?
    When the explorer hangs, please press ctrl-alt-del, then launch the task manager, check if there're any abnormal process which takes up a high CPU\disk\memory.
    Meanwhile, please temporarily turn off AV programs cause real-time scan for the files might also cause a crash. please also patch the system with latest Windows Updates and driver updates
    Yolanda Zhu
    TechNet Community Support

  • Can't copy .mov files to another drive, get msg

    Hi
    I've been trying to copy some .mov files (ext. isn't showing, btw) to another drive. When I do I get this msg, 'The operation can't be completed because the item "blah blah" is in use.
    I also have gotten this msg when copying the folder: 'The operation can't be completed because the item ".DS_Store" is in use.
    Then I tried creating a new folder to put them in, and I get this msg, "The operation can't be completed. An unexpected error occurred (error code -50).
    QT isn't open. The only apps open are Firefox and Word.
    I tried adding both drives to Spotlight's Privacy in System Prefs. No help.
    Any ideas?
    best,
    elmer

    Thanks for the reply!
    What is the 'DS_Store' file?
    Am I right thinking Tinker Tool allows you to choose from that list of details on this page <http://www.bresink.com/osx/0TinkerTool/details.html>, and doesn't simply enable them all?
    Thanks again, maybe someone else can chime in about why I got the other messages, tho maybe the ds_store was the reason for all.

  • Restoring picture and movie files after hard drive failure and repair

    I need some help restoring photo/movie files from my external hard drives after my iBook was repaired following a storm. I have backups hidden all over my external hard drives. I have unburned burn folders that may have pictures on them. I was using iPhoto from iLife 05 and iLife 08, and Kodak Easy Share. I have searched on spotlight using ".jpg", "pics", and ".mov" and titles of various images, but I am still missing images that I am fairly sure I duplicated to external hard drives. Any ideas for searching?

    Thanks, I just downloaded EasyFind. I ran an initial search and it looked very effective. I will have to manually check the search results to see if it is getting any files I haven't already been able to find.

Maybe you are looking for