Delete File From Mounted Volume

Hey,
I am trying to delete the "Calendar Cache" files on both my laptop PowerBook G4 and the Mac Pro Quad that I sync my calendars with. I am using ChronoSync and the individual calendars sync fine, but there is a little house keeping needed with the cache file. They need to be deleted on both systems in order to "refresh" the views of the calendars.
So after the sync of calendars, I have the software initiating an AppleScript that deletes both. Here's the script:
+(* PowerBook Files / delete cache file *)+
+(* Please note that both systems have the same username. This may be arise a conflict *)+
+tell application "Finder"+
+ activate+
+ tell application "Finder" to delete file "Calendar Cache" of folder "Calendars" of folder "Library" of disk "useranthony"+
+end tell+
+(* Mac Pro Quad/ delete cache file *)+
+tell application "Finder"+
+ mount volume "afp://10.10.10.1/anthonyabraira"+
+ tell application "Finder" to delete file "Calendar Cache" of folder "Calendars" of folder "Library" of disk "/volumes/useranthony"+
+end tell+
I am having trouble addressing a deletion on the networked Mac Pro Quad.

why send it to the trash — just delete it...
(* PowerBook Files / delete cache file )
try
        do shell script "rm -rf /Library/Calendars/Calendar\\ Cache"
end try
you may need a delay for the Mac Pro Quad to mount
( Mac Pro Quad/ delete cache file *)
--the mount and then the delay
delay 4
try
        do shell script "rm -rf /THE-CORRECT/PATH-HERE/Library/Calendars/Calendar\\ Cache"
end try
Tom

Similar Messages

  • After Update, cannot delete files from nss volumes

    Not sure if this is the same problem caused by the SLES11 upgrade, but after running all the upgrades on an OES11 system, I can see all the nss volumes of the upgraded servers from workstations using the Novell client, and I can copy or create files on these volumes. However, I cannot delete any files, they disappear from the workstation windows explorer when they are "deleted", but an f5 promptly shows the files are still there. I can go into the server as root, and delete the files under Linux with no problems, so this part is working OK.
    I am running Novell 11.1 patch 1, and this problem has only been noticeable after the update installation.
    I have supervisor rights to the volumes and files, and if I additionally set all the other file rights, I am still unable to delete the files.
    Anyone got any ideas?
    Cheers.
    ChasR

    Originally Posted by chas
    Not sure if this is the same problem caused by the SLES11 upgrade, but after running all the upgrades on an OES11 system, I can see all the nss volumes of the upgraded servers from workstations using the Novell client, and I can copy or create files on these volumes. However, I cannot delete any files, they disappear from the workstation windows explorer when they are "deleted", but an f5 promptly shows the files are still there. I can go into the server as root, and delete the files under Linux with no problems, so this part is working OK.
    I am running Novell 11.1 patch 1, and this problem has only been noticeable after the update installation.
    I have supervisor rights to the volumes and files, and if I additionally set all the other file rights, I am still unable to delete the files.
    Anyone got any ideas?
    Cheers.
    ChasR
    I had a similar problem at updating with SP3 on SP4. It was similar, that permission ERASE is not applied to all trustees working through ncp in spite of the fact that it was available.
    Has solved a problem that has redefined this permission for trustees on all catalogues.

  • Installed OS X Snow Leopard on external HDD, now won't allow me to delete files from Mac internal drive

    Hi,
    I am stuck!  My 1 TB iMac 27" decided to stop booting up and would only stay at the grey screen with the apple, gear turning and progress bar. When it got to a certain point on the progress bar it would shut down.  Thanks to so many helpful people and their experiences I was able to try many different things including (Command + S, typing /sbin/mount -uw / enter , chmod 775 / enter, logout enter, then rebooting holding down Command + V) and (Reinstalling OS X and using Disk Utility to repair - came up with Disk can't be fixed).
    Nothing worked until I read a couple of very wise answers who said "Your hard drive is not dead, but too full...keep at least 10% free at all times". I was down to about 1% (ooops!)  Thankfully hubby had bought me an external HDD for Christmas, onto which I installed OS X and being connected to my iMac, it recognized my internal Macintosh HD and all my files are there.  Phewww!  But I don't want to use my external HDD as my startup disk, I wan't to keep my Macintosh HD for startup but it is too full to repair and select as startup.
    My problem is that I cannot delete files from Macintosh HD, and I've tried to unlock files/folders but they don't seem to be locked.  But when I drag them to the trash can it says "The item ... can't be moved to the Trash because it can't be deleted."  Again, many helpful answers online, but nothing is working.  I have 2 Finder windows open, one with external HDD (new startup disk), and old HDD (Macintosh HD) but all items in Macintosh HD can't be altered or deleted (right click doesn't highlight to change the name).  So if I can't delete my files, I can't reinstall OS X and repair disk and select it as my startup disk.  I'd be so thrilled if someone can help me.  I have tried unlocking folders, and I downloaded 'Trashit'. Neither worked, so I figure because it has the little pencil crossed out on the menu bar that it is protected somehow...I just don't know how/what to do.  Thanks

    Ok, so I'll try set it out a bit clearer than my first post,
    This is what I've done, and the results:
    1. My son unplugged working iMac Mac OS X Snow Leopard 10.6.2, 1TB with only 11GB available space
    2. Turned it on and got the white screen, apple, turning gear and load-up bar
    3. Turned Mac off and waited 1/2 a minute.
    4. Turned Mac back on...(same as 3.), tried again many times
    5. Began searching internet for answers (see original post)
    6. Found answers and did the following:
                   1.     Put OS X installation disk into drive
                   2.     Attached External Hard Drive
                   3.     Installed OS X onto External Hard Drive (With a different name & password to original HDD)
                   4.     Found Macintosh HD still worked so tried to delete files only to get message saying                                           files couldn't be deleted (see original post)
    I've tried changing the permissions in 'Get Info' and this is what happens:
    1.Right click Macintosh HD - says "You can only read"
                                                      Name: System - Read & Write
                                                                 Admin -   Read & Write
                                                                 Everyone - Read only
    2.Click on padlock to unlock - doesn't turn black to be able to change anything
    3.Check the box "Ignore ownership on this volume" (someone else advised to do this)
    4.Name changes to 'mydrive (Me)'
    5.Lock padlock and Name still says mydrive (Me) but still 'You can only read'
    I don't know what is wrong or what to do, but perhaps you are right LowLuster, that because I named them different names it is protected in some way.
    My thought now is to copy all my files to the external HDD and then erase and install again on my internal HD, but I really need my calendar, emails etc from my old HD and not sure they can be found on the old HD to copy over.
    Still stuck!

  • Is it possible to delete files from time machine?

    Is it possible to delete files from time machine? I had a drive crash, restored the files to a new drive, and now the old versions and the new versions of the files are both backed up, taking up a mountain of drive space. Do I just have to wait 'til the drive gets full and then tell it what to delete first?

    Hi, I need help in a related problem. I have 500gb time capsule. I needed larger hard drive, so I now use TM to back up to a different 1tb hard drive. So I don't need the TC as a TM back up device. But I want to use the TC's hard drive as an extra external hard drive. I deleted the files that were on it. but it still shows it has a sparsebundle file with a size of over 400gb ( probably the size of the old backups). When I use disk utility to try to erase it, I am not offered the erase tab. This "disk" does show on the desk top as a mounted disk (I think) with only 53 gb free. How can I set this up so all the disk space is free and I can use it for storing files, not as a back up? Thanks

  • HOw to delete files from remote server?

    Hi,
    I want to delete files from a directory on remote server.
    I use the following command to delete on current server:
    find $srcdir -mtime +90 -name "COR*.txt" -exec rm -f {} \;
    Now, how can I delete files from remote server ?
    Thanks!
    Yogini

    Some possible options:
    1. There exists SSH implementation for Windows.
    2. You can make a workaround. You can setup share for specific/wanted directory.
    Then you can mount it on Linux machine and execute command localy and delete files "localy" in mounted directory.
    3. You can setup FTP server on Windows machine and do that remotely via FTP commands.

  • Can't move files from one volume to another

    Using the 1.2 client on SLED, I don't appear to be able to move files from
    one volume to another. I have two drive "mappings", each to a
    different volume on a NW65SP5 box, but when I try and cut and paste files
    I get an error saying "Not on the same file system". However if I drop to
    a terminal and just use mv, that works.
    Is this a known issue?
    Joe

    On Tue, 12 Sep 2006 12:59:23 +0000, Joseph Marton wrote:
    Hmm, yep get the smae problem when trying to move files.
    Copy works just great though.
    I know there are some issues in Gnome/Nautilus that's being worked upon.
    These are outlined in the Readme. For example it's not possible to copy a
    folder from Server A to Server B, then delete the folder form Server A.
    Finally later on copy the folder back to Server A from Server B.
    Also Gnome is leaking file handles, which could be the cause for the
    problem we're getting here.
    I'll ask my contact at Novell about this and have him enter it in as a bug
    if it's not a known issue.
    For a workaround you already have a good alternative of using mv in a
    terminal.
    Niclas Ekstedt, CNA/CNE/CNS/CLS
    Senior Network Consultant/NSC Sysop
    Telindus Sweden AB

  • If I delete files from my computer, do they remain on the time capsule and how do I access them?

    If I delete files from my computer's hard drive do they remain on time capsule? Where? How do I access them?

    So long as the deleted files have been backed up to Time Machine then they will be there for you to acces in the following manner:
    From the Time Machine icon in the Menu Bar click and hold to expose the drop-down menu. Select "Enter Time Machine". [The Time Machine volume must be attached to your Mac, of course, otherwise this procedure will not work.] Once you are in Time Machine go to the date when you remember the file being on your internal drive; you can also do a Search for the file name. Once the file has been located you highlight it and click "Replace" and the file will be replaced; if a file of the same name is in the exact same location you will be presented with the option to replace or keep both.

  • My start up disk is full.  How do I delete files from this?

    My air is saying my start up disk is full.  How do I delete files from it?  Is there a specific location I'm supposed to delete from, or is it just general files from everywhere--email, etc.

    For information about the Other category in the Storage display, see this support article. If the Storage display seems to be inaccurate, try rebuilding the Spotlight index.
    Empty the Trash if you haven't already done so. If you use iPhoto, empty its internal Trash first:
    iPhoto ▹ Empty Trash
    Do the same in other applications, such as Aperture, that have an internal Trash feature. Then restart the computer. That will temporarily free up some space.
    According to Apple documentation, you need at least 9 GB of available space on the startup volume (as shown in the Finder Info window) for normal operation. You also need enough space left over to allow for growth of the data. There is little or no performance advantage to having more available space than the minimum Apple recommends. Available storage space that you'll never use is wasted space.
    When Time Machine backs up a portable Mac, some of the free space will be used to make local snapshots, which are backup copies of recently deleted files. The space occupied by local snapshots is reported as available by the Finder, and should be considered as such. In the Storage display of System Information, local snapshots are shown as  Backups. The snapshots are automatically deleted when they expire or when free space falls below a certain level. You ordinarily don't need to, and should not, delete local snapshots yourself. If you followed bad advice to disable local snapshots by running a shell command, you may have ended up with a lot of data in the Other category. Ask for instructions in that case.
    See this support article for some simple ways to free up storage space.
    You can more effectively use a tool such as OmniDiskSweeper (ODS) or GrandPerspective (GP) to explore the volume and find out what's taking up the space. You can also delete files with it, but don't do that unless you're sure that you know what you're deleting and that all data is safely backed up. That means you have multiple backups, not just one. Note that ODS only works with OS X 10.8 or later. If you're running an older OS version, use GP.
    Deleting files inside an iPhoto or Aperture library will corrupt the library. Any changes to a photo library must be made from within the application that created it. The same goes for Mail files.
    Proceed further only if the problem isn't solved by the above steps.
    ODS or GP can't see the whole filesystem when you run it just by double-clicking; it only sees files that you have permission to read. To see everything, you have to run it as root.
    Back up all data now.
    If you have more than one user account, make sure you're logged in as an administrator. The administrator account is the one that was created automatically when you first set up the computer.
    Install the app you downloaded in the Applications folder as usual. Quit it if it's running.
    Triple-click anywhere in the corresponding line of text below on this page to select it, then copy the selected text to the Clipboard by pressing the key combination command-C:
    sudo /Applications/OmniDiskSweeper.app/Contents/MacOS/OmniDiskSweeper
    sudo /Applications/GrandPerspective.app/Contents/MacOS/GrandPerspective
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window by pressing command-V. You'll be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. You may get a one-time warning to be careful. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The application window will open, eventually showing all files in all folders, sorted by size. It may take a few minutes for the app to finish scanning.
    I don't recommend that you make a habit of doing this. Don't delete anything as root. If something needs to be deleted, make sure you know what it is and how it got there, and then delete it by other, safer, means. When in doubt, leave it alone or ask for guidance.
    When you're done with the app, quit it and also quit Terminal.

  • Process Chain - Delete File from Application Server

    Hi Gurus,
    Im working with Process chain, and i have a load from a flat file, so my question is :
    How can i delete that file from the application server after was loaded ?
    THANKS IN ADVANCED !!! I REALLY APRECCIATE YOUR HELP.
    Marcos

    hi,
    I have gone through the forum you have posted for deleting files from application server through process chain.
    I have similar reuirement in my project.
    Can you please provide me the solution?
    Your inputs will be highly appreciated.
    Thanks in advance.
    Regards,
    Lavanya.

  • Trying to delete file from trash but get this: The operation can't be completed because the item "File name" is in use. All other files delete except this one. Please help

    Trying to delete file from trash but get this: The operation can’t be completed because the item “File name” is in use. All other files delete except this one. Please help

    Maybe some help here:
    http://osxdaily.com/2012/07/19/force-empty-trash-in-mac-os-x-when-file-is-locked -or-in-use//

  • Hi,delete file from folder?

    hi,i am deleting file from folder as follwos
    <%@ page import="java.io.File" %>
    <%
    File myFile = new File("D:\\jakarta-tomcat-4.1.18\\webapps\\ROOT\\upload_files\\xyz.txt");
    myFile.delete();
    %>
    i am sucessfuly deleted file from above path.
    if i use follwing code i unable to delete my file, can one help,
    how to do it,
    <%@ page import="java.io.File" %>
    <%
    String fname="xyz.txt";
    File myFile = new File("D:\\jakarta-tomcat-4.1.18\\webapps\\ROOT\\upload_files\\'"+fname+"'");
    myFile.delete();
    %>
    thanks
    pullareddy

    i think if above doesn't work try this it should work
    change this line
    File myFile = new File("D:\\jakarta-tomcat-4.1.18\\webapps\\ROOT\\upload_files\\'"+fname+"'");
    to this
    File myFile = new File("D:\\jakarta-tomcat-4.1.18\\webapps\\ROOT\\upload_files\\"+fname);

  • Delete file from folder only (not from list)

    Hi all,
    I've searched a lot and didn't succeed so far, that's why I need your help. In a cloud context, I'm actually creating and uploading files (pdf and/or xml files) "on the go" to sharepoint folders via the SOAP API and this is perfectly working. But
    in a cloud context, I also need to decomission services which is translated into deleting files into Sharepoint.
    That's where it became complicated, because according to the API we cannot delete files if they are not part of a list structure, which is not my case. Is that true ?
    The only info I have when trying to delete a file via the SOAP Api is : its name, its folder, and the endpoint where the folder is. So my question remains simple I guess : is this possible ? If so, how to (a link to the SOAP body would be usefull)
    Thanks a lot
    Regards
    Baptiste

    Hi,
    According to your post, my understanding is that you want to delete file from folder.
    In SharePoint 2010, It is recommended to use Client Object Model to achieve it, the following code snippet for your reference:
    string siteURL = "http://siteurl";
    ClientContext context = new ClientContext(siteURL);
    //specific user
    NetworkCredential credentials = new NetworkCredential("username", "password", "domain");
    context.Credentials = credentials;
    Web web = context.Web;
    context.Load(web);
    context.ExecuteQuery();
    string relativeUrl =web.ServerRelativeUrl +"/DocumentLibraryName/FolderName/FileName";
    File file = web.GetFileByServerRelativeUrl(relativeUrl);
    context.Load(file);
    file.DeleteObject();
    context.ExecuteQuery();
    If you still want to use SOAP API, we can use the UpdateListItems method under Lists web service to achieve it.
    http://www.dhirendrayadav.com/2010/06/delete-list-items-using-web-service.html
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/61466984-1844-48a1-8c1e-1c59a0f9876a/move-and-delete-files-remotely-using-sharepoint-web-services-?forum=sharepointdevelopmentlegacy
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • Delete file from directory which

    Hi ,
    I want to delete files from a directory in  Application server.
    I have the file name as fn_13/07/2007.txt
    Have a condition that files should be deleted which are less  than 10 days.
    Is there any function module to do this.
    Thanks in Advance.
    Regards,
    Indhra

    Hello Indhra,
    These methods may help ( from CL_GUI_FRONTEND_SERVICES )
    <b>DIRECTORY_BROWSE</b>     Static Method     Public          Shows a Directory Selection Window
    <b>DIRECTORY_CREATE</b>     Static Method     Public          Creates a Directory in the Client
    <b>DIRECTORY_DELETE</b>     Static Method     Public          Deletes a Directory in the Client
    <b>DIRECTORY_EXIST</b>     Static Method     Public          Checks if a directory exists
    <b>DIRECTORY_GET_CURRENT</b>     Static Method     Public          Returns the Current Directory
    <b>DIRECTORY_LIST_FILES</b>     Static Method     Public          Lists Files in a Given Directory
    <b>DIRECTORY_SET_CURRENT</b>     Static Method     Public          Sets the Current Directory (Do NOT Use)
    <b>ENVIRONMENT_GET_VARIABLE</b>     Static Method     Public          Gets an Environment Variable
    <b>ENVIRONMENT_SET_VARIABLE</b>     Static Method     Public          Sets an Environment Variable
    <b>EXECUTE</b>     Static Method     Public          Starts an Application or Opens a Document in the Client
    <b>FILE_COPY</b>     Static Method     Public          Copies a File
    <b>FILE_DELETE</b>     Static Method     Public          Deletes a File

  • Delete file from adobe reader?

    hi guys..i want delete file from adobe reader after download from email. unfortunately i cant see any delete icon in my file. Any ways to delete it?

    Check out the new and FREE 'AIR Browser' File Manager in appworld. You can use it to create/rename/delete folders and sub-folders, it can also copy, cut, paste and delete files.
    Jerome
    If a post was helpful, please click the kudos star button below it.
    If a post solved the problem you raised in your thread, click on 'Accept as Solution'.

  • How to permanently delete files from trash?

    I usually see TV series online. Every time I visit to the website, it automatically downloads a Mac_Installer file to my Downloads folder. I delete the file without opening it and secure empty the trash. When I visit the website again, the same file is downloaded to my Downloads folder, and the "previous deleted file" from the trash can reappears on it. How to solve this matter? My computer is a MacBook Pro and is running OS X Mavericks.
    Thanks.

    Try erasing free space using Disk Utility.
    Erase free disk space
    When you delete files in Mac OS X, your Mac deletes the information used to access the deleted files but doesn't physically remove them. Although the space used by the deleted files appears as free space, the deleted files remain on the disk until new files are written over them. As a result, these files can be recovered. Erasing free space does not delete any other files on your disk besides the ones that you already deleted.
    After the drive is connected, launch the Disk Utility application in any of the following ways:
    Type the first few letters of its name into Spotlight. Select it from the results.
    Go Finder > Applications > Utilities > Disk Utility
    Go Launchpad > Utilities > Disk Utility
    Once you are in the Disk Utility app, select the disk or partition you would like to erase from the left.
    Select the Erase tab.
    Choose the Erase Free Space button.
    Use the Slider to choose how many times you would like to write over the free space.
    Select Erase Free Space.
    Note: After this process starts, you can cancel it at any time without harming any of your data. You might see a message stating that you are running out of disk space. This is normal and to be expected. You can ignore this message.
    When the process is complete, you should have the same amount of free space. If you do not have the same amount of free space, try restarting the computer.
    I hope I helped.
    Austin

Maybe you are looking for

  • How can I download photos from iCloud to my photo albums in my ipad

    HHow can I download my photos from icloud to my photo albums on my ipad

  • De-installing Oracle personal edition

    I've installed Oracle Personal Edition 8.1.6 on a D: drive of an NT 4.0 machine. As it turned out, I really needed to install it on C:. So, I attempted to de-install it from D:. When done with the de-installation using the Universal Installer (and it

  • Moving div tags?

    Sorry for all the questions but if I finally understand then I will stop asking. Here is the html code for my site so far: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" " http://www.w3.org/TR/html4/loose.dtd"> <head> <meta http-equiv

  • Is Adobe Premiere Elements 7 also compatible with Windows 7?

    I have bought some months before Premiere Elements 7... is it compatible with Windows 7?? Flagezeichen

  • List of new mods

    · 01-last-visit-profiles.diff Adds the users last visit date to their profile · 02-last-visit-memberlist.diff Adds the users last visit date to the memberslist.  People who have registered but never logged in are shown as "never".  Admin may use this