Dot_clean Command?

Would there be any way to have an AppleScript that would be running in the background and would run the dot_clean command on a thumbdrive right before it is ejected? I'm sick of those .DS_Store and .Spotlight files when I move to a Windows PC.

no, sorry, but there is absolutely no way to do that. If you want to streamline the process a bit more you can get rid of the first popup in dev's script. Then to eject the drive you simply have to drag and drop it onto applet's icon. Also, to run a shell script with admin privileges inside an apple script you normally use the syntax
do shell script "blah-blah" with administrator privileges
however, this will cause the program to ask you for your admin password. To further streamline the process you can use
do shell script "blah-blah" password "your-admin-password" with administrator privileges
This will make it run silently but it will also mean that you'd have to enter your admin password in the script in open text. This is clear a security risk and I'm not sure you'd want to do that.

Similar Messages

  • The dreaded Error -32

    Hey everyone,
    I have been googling this for the last couple of days and tried various things but nothing has helped. I have been trying to copy a large amount of data from one external HD to a brand new WD 2TB drive and I constantly get the Error -32 message appearing and the copy failing.
    ie: "The Finder can’t complete the operation because some data in “The Shawshank Redemption.mp4” can’t be read or written.
    (Error code -36)"
    It doesn't always happen on the same file/folder. It seems random and there is no apparent reason for it. The drive I am copying from is operating correctly and the 2TB is brand new. I actually bought a 1.5TB and had the error initially and after running WD diagnostic software it said there was a problem so I took it back and got the 2TB. Now its happening with this one so I am confident that the problem lies in the Mac. Both external drives are connected to the Mac through a USB hub, but connecting one to the Mac and one to the hub still continues to have the problem. I thought it might be a data buffer error or something. I am not running any server or anything as I saw this error can appear when sometime with a server being used.
    Has anyone managed to resolve this error? I did find a you tube video of a guy using the dot_clean command in terminal and that didn't work either. I seem to be successful in copying the files when done in small batches (2-3 folders at a time), but this would take forever with my whole itunes files requiring a move to the new drive.
    Hope someone out there has an answer.
    Cheers

    Well, I often got "The Finder can't complete the operation because some data in x can't be read or written (Error code -36)" with a task much simpler than copying big chunks of data between hard drives.
    It happens every other time I try to upload less than 2 MB of files to an iDisk folder. It's annoying. Some files can be copied, and when this error arises its ugly head, the Finder stops uploading the rest.
    For the record, I've just repaired my disk, and some of these "unreadable" files are in .psd format. Maybe can we blame Adobe for another software hiccup?
    JJ

  • Error -36 with external harddrive

    As of very recently (perhaps since the installation of SuperDrive Firmware 3.0) I'm experiencing a weird problem using my FAT32 external drives (pendrive and WD external harddrive): I get -36 errors when trying to write a folder containing files to the drives. It will create the folder in the destination drive, but then give me the -36 error and stop copying the files into the folder.
    I never had problems with my FAT32 drives before.
    So then I thought it must have been connected to the fact that I created the specific folder and the Wordfiles in them on a PC at uni, so that perhaps it was a compatibility issue of PC-created folders/files. The funny thing is that some folders with files unrelated to a PC copy just fine. Especially the folder that I created on a PC and copied to my Mac via a pendrive (which, a couple of weeks ago, worked just fine), does now not copy to a pendrive.
    Then I had the same problem with copying a folder full of newly created (on a Mac) mp3s; to and from the pendrive would give a -36 error. Since I have recently installed Dropbox on my computer, I uninstalled it (just a gut feeling, not based on any knowledge), did a clean restart and then the folder with mp3s copied fine to and from my FAT pendrive. But the problem with the specific folder full of PC-created wordfiles continued!
    I'm just very confused... does anyone have the same experience and perhaps some tips?
    My MacBook is only 4 months old and running 10.6.2. I recently installed the SuperDrive Firmware 3.0 update.
    Message was edited by: Sebastian0883

    there are a lot of posts about this on the forum. do a search. in a nutshell there is a bug in snow leopard Finder when dealing with FAT formatted drives. apple has promised to fix it in the next update. the bug happens when you copy a folder from a FAT formatted drive to an HFS+ formatted one and then try to copy it back later.
    FAT FS doesn't support resource forks and they are kept as separate ._ files. when you copy stuff to an HFS+ formatted drive the resource forks supposed to be merged with the original but sometimes this does not happen. then when you try to copy something back the split resource fork for the hidden .DS_Store file in the folder you are trying to copy causes the error you are seeing. a workaround is to run the unix dot_clean command to reabsorb all resource forks into main files prior to copying stuff back to a FAT drive. the syntax is very simple. to do it for everything in your home directory run this in terminal
    dot_clean -m ~
    then you can copy anything from your home directory to a FAT drive without issues.
    to do it to any other folder you do
    dot_clean -m /path/to/folder
    prior to copying.

  • How to fix error 36 on AVI files?

    Hi I'm trying to back up a lot of avi files from an 500g IOMEGA External Hard Drive (MS - DOS (FAT)) to a 2TB WD My Passport External Hard drive (MAC OS Extended (Journaled)). Some of the files were copied from a friend's hardrive a couple of years ago, as far as I'm aware he is windows based, and some of these are the ones I am having trouble with copying.
    The irritating thing is I can't copy anything without going through which ones have an error and which ones don't, I have been trying to copy the files through terminal as I watched this video - http://www.youtube.com/watch?v=6DLLQL7AvS0&feature=player_embedded and it did not work for me at all, it kept telling me it was a directory and did nothing.
    Follwing that I tried the dot_clean command on the folder and it still would not transfer.
    Finally I used the  rsync -av /path/to/source /path/to/destination command line, which started working but stalled at the first file I have been having problems with.
    There is nothing wrong with avi file, it plays fine and as far as I can tell there is nothing wrong with the IOMEGA hard drive itself. I really want to back this stuff up and I've run out of ideas and I've searched everywhere for further solutions, I'm doing this through a MBP 2010 with SSD on OS X Mountain Lion 10.8.3. If anyone can give me an alternative way of transferring the files through terminal that will skip over the files with errors and then how to repair the files themselves I would be very grateful.
    Thanks.

    All I can suggest is using Data Rescue type software that will read the 1's and 0's of what makes up the files and rebuilds them from that, not what the corrupted file structure says.
    Have you considered the files are tainted by malware or some sort of trick bag stuff?

  • Getting error -36 while copying from mac HD to usb HFS+ drive

    Hi
    first off, id did google this stuff.. but couldn't find a solution. i tried all the dot_clean stuff without result.
    i'm running the latest update of snow leopard 10.6.7
    so here's the situation:
    i've got this 1TB FAT32 usb-drive filled with backups that i wanted to re-format to HFS+ so i could fit files >4GB on it. So i backed up that backups to some other USB drives (HFS+ formatted) and formatted the 1TB to HFS+ using disk utility.
    After formatting, I start to refill the newly formatted 1TB HFS+ from the other HFS+ drives...
    and always, after copying about 90GB my 1TB starts making noises like it's trying to read/write something to/from the disk. short typical HD-activity sounds quickly following each other. this continues for about 30s and after that i get the error -36.. the disk is then 'unproperly removed'. when i remount the 1TB afterwards, it acts like nothing's happened. the 90 GB of files that were written to it before the crash are still there and readable, a can even create a new folder on the drive but as soon as i try to write say a 1GB file to the drive BANG some stuff.. that horrid -36...
    I've already used the dot_clean command on all the folders i backed up from the 1TB, I can't seem to find any .._DSstore files..
    I am starting to think this might be a hardware related problem..?
    thanks so much in advance
    lars

    First, check that the USB cables are securely seated at both ends. If possible, use different cables; if not, switch the cables between drives.
    Is the 1 TB drive partitioned in GUID format? You determine this by selecting the drive icon (above the volume icon) in Disk Utility, and looking at the bottom of the window for the "Partition Map Scheme." If not, partition it in that format. Erase the HFS volume with the option of writing zeros to it ("Security Options..."). This will cause any bad sectors on the drive to be mapped out. It will take much longer than a simple formatting. Then run Verify or Repair Disk on the other USB drive.
    Try the copying operation again. If you still get error -36, then either the enclosure or the mechanism of the 1 TB drive has failed -- almost certainly not both.

  • I get error -36 when I try to verify or install the EVE online dmg

    I am trying to install 'EVE online' from the .dmg file I downloaded from their site (and Cnet). Each time I download it an double click to verify, it gets to a certain point and says 'error -36' read or write error. Same if I skip the verification and try put it into applications.
    I've tried disk utility to repair but it says the image is ok, and I've tried the dot_clean command but it doesn't work on a .dmg as it's not a directory. I have re- downloaded and get the same thing happens. Also tried downloading through the terminal as some threads said it's because the file size is not listed right from the eve server but that didn't help.
    It's a 5gig download and 10gig when installed which might have something to do with it (size)
    Please help!

    Error -36 is I/O error, w/o specifying if the error is in the source or the target.
    So, first of all, verify your disk(s) with Disk Utility, just to make sure there's no problem there.
    If there isn't, then there's a problem with the download. Consult "EVE online" (whatever that might be) tech support and user forums.

  • Dot_clean on root

    I was just wondering, would it be ok if I ran dot_clean on the root of my drive?  "dot_clean /" or will that cause problems?
    Reason I ask is because I just want to reset the finder views and everything in general.  I have FAR too many different folders loading differently in finder and would like to get defaults on ALL folder views back, and running "dot_clean /" would seem to be the easiest, but want to double check first.

    dot_clean doesn't do what you think it does. Leave it alone.
    To reset all Finder views in your home folder, proceed as below.
    Back up all data if you haven’t already done so. Before proceeding, you must be sure you can restore your system to the state it’s in now.
    Launch the 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.
    ☞ If you’re running Mac OS X 10.7 or later, open LaunchPad. Click Utilities, then Terminal in the page that opens.
    Copy or drag — do not type — the line below into the Terminal window, then press return:
    find ~ -type f -name .DS_Store -delete
    The command will take a noticeable amount of time to run. When a new dollar-sign (“$”) prompt appears below what you entered, quit Terminal.

  • Logical command in ABAP.....Urgent

    Hi,
      i am pretty new using ABAP program so i neeed help urgently. i am trying to move a file on the application server from one directory to the other and i was using the open dataset function to do that. but the file i am trying to move is pretty big and because i am using internal table to store, it is causing problems with the space.
      i have consulted the basis guys and they have managed to create a logical file for copying from one directory to the other on the application server. to help you furthter. i am enclosing the mail sent to me.
    I have created a logical command which should copy the file from one location to the other but you need to pass it the source dir and file name and the destination dir and file name.
    The logical command is ZCOPY and uses cmd /c copy
    Copies one or more files to another location.
    COPY [/V] [/N] [/Y | /-Y] [/Z] [/A | /B ] source [/A | /B]
         [+ source [/A | /B] [+ ...]] [destination [/A | /B]]
      source       Specifies the file or files to be copied.
      /A           Indicates an ASCII text file.
      /B           Indicates a binary file.
      destination  Specifies the directory and/or filename for the new file(s).
      /V           Verifies that new files are written correctly.
      /N           Uses short filename, if available, when copying a file with a
                   non-8dot3 name.
      /Y           Suppresses prompting to confirm you want to overwrite an
                   existing destination file.
      /-Y          Causes prompting to confirm you want to overwrite an
                   existing destination file.
      /Z           Copies networked files in restartable mode.
    The switch /Y may be preset in the COPYCMD environment variable.
    This may be overridden with /-Y on the command line.  Default is
    to prompt on overwrites unless COPY command is being executed from
    within a batch script.
    the problem now is i have no idea about how to use the logical command. can any one help me.
    Thank you,
    Ravi.

    If memory is not an issue, then there should be no reason why this should not work.
    report zrich_0001.
    parameters: d1 type localfile default '/usr/sap/TST/SYS/Data1.txt',
                d2 type localfile default '/usr/sap/TST/SYS/Data2.txt'.
    data: itab type table of string with header line.
    start-of-selection.
    * Read old file
      open dataset d1 for input in text mode.
      if sy-subrc = 0.
        do.
          read dataset d1 into itab.
          if sy-subrc <> 0.
            exit.
          endif.
          append itab.
        enddo.
      endif.
      close dataset d1.
    * Write to new file
      open dataset d2 for output in text mode.
      loop at itab.
        transfer itab to d2.
      endloop.
      close dataset d2.
    * Delete the old file
      delete dataset d1.
    Regards,
    Rich Heilman

  • Shell commands in applescript noob

    Hi all this is my first post in these forums and I come seeking help with a certain script I'm writing for my current college job. The purpose of the script is to install creative cloud from a server and this is as far as I've got. First I can get as far as setting the correct directory in the server by doing:
    do script "cd /Volumes/applications/Mac/'Adobe Creative Cloud'/'Enterprise - enduser'/Build"
    now when I press run the terminal screen pops up just fine with no errors in the right directory. However I've been reading up that to do other commands in the same shell I must do do shell script. When doing this however terminal doesn't do...anything. The reason why I was trying this is because my next command would be initiating the install which is the command:
    "installer -verbose -pkg 'enterprise_Install.pkg' -target /" with adminitrator privilages
    Now my question is how would formulate this within applescript? Thanks.

    do shell script "cd /Volumes/applications/Mac/'Adobe Creative Cloud'/'Enterprise - enduser'/Build ;  installer -verbose -pkg 'enterprise_Install.pkg' -target / with administrator privilages"
    You got the double quote in the wrong place.
    do shell script "cd /Volumes/applications/Mac/'Adobe Creative Cloud'/'Enterprise - enduser'/Build ;  installer -verbose -pkg 'enterprise_Install.pkg' -target / " with administrator privilages
    It is easier to diagnose problems with debug information. I suggest adding log statements to your script to see what is going on.  Here is an example.
        Author: rccharles
        For testing, run in the Script Editor.
          1) Click on the Event Log tab to see the output from the log statement
          2) Click on Run
        For running shell commands see:
        http://developer.apple.com/mac/library/technotes/tn2002/tn2065.html
    on run
        -- Write a message into the event log.
        log "  --- Starting on " & ((current date) as string) & " --- "
        --  debug lines
        set unixDesktopPath to POSIX path of "/System/Library/User Template/"
        log "unixDesktopPath = " & unixDesktopPath
        set quotedUnixDesktopPath to quoted form of unixDesktopPath
        log "quoted form is " & quotedUnixDesktopPath
        try
            set fromUnix to do shell script "sudo ls -l  " & quotedUnixDesktopPath with administrator privileges
            display dialog "ls -l of " & quotedUnixDesktopPath & return & fromUnix
        on error errMsg
            log "ls -l error..." & errMsg
        end try
    end run

  • Issue to write/execute AT-commands for a 3G modem

    Dear community,
    For the past month, I'm searching for some help on this topic without success, "you are my last hope"
    After modification of the PPP parameters under network preferences (according the clear archive from apple support on this topic), the terminal windows is poping up without any problem.
    Then... I can't write anything on this terminal !!! The only actions I'm able to perform is cancel or continue button. I also press the Return key as apple support mentioned (issue for 10.2 or earlier), nothing.
    The test was done on a early 2010 macbook 13 and the same on a mid 2010 macbook 15, the same issue.
    - Am I doing something wrong or mac os restricted this com protocol?
    - Is there a way to command the modem trough the main computer terminal (which is working properly)?
    Thank you in advance!

    You've probably solved this problem long ago, but I came across this thread a couple weeks ago when trying to do the same and thought I post this .vi for future users.  This code is for a multitech MT5656ZDXV modem, but I think the AT commands are generic enough to be used with any voice modem. Hardware configuration requires and audio cable running from the PC speaker to the modem mic port.  Also, I had to use a Konnex Office Konnector telephone line A/D which required me to manually pick up a handset; the software prompts the user to do this.  Fancier A/Ds should eliminate the need for this and I have one on order.  If you have an analog phone line then there should be no need to use an A/D or manually pick up the phone.
    Attachments:
    modem_speakerphone.vi ‏21 KB
    Sound Player.vi ‏17 KB

  • Manage-bde command is not generating recovery key on network location

    Hi,
    I am trying to save the recovery key to the network share location and start up key in the USB drive while enabling bit locker.When the OS drive gets encrypted, the default folder for recovery password shows that it contains 1 file but not getting anything
    inside it when i checked the properties of the folder.
    i have already changed the group policy as "choose default folder for recovery password".
    I am using the command to enable the bit-locker as "manage-bde.exe -on C: -rk
    <network location to save recovery key> -sk <location of the USB drive>
    -rp to enable the bit-locker. It is generating the start up key in the USB but not the recovery key on network share.
    Can anyone suggest what i am missing or what else i should do to generate the recovery key on network share.
    Does manage-bde process be able to save the recovery key on network share or it hand over to some other process to perform this task.
    Thanks
    Gaurav Ranjan

    I got you Manoj, but I want to ask you one think that what if i lost the startup  key or my USB stick. I have my recovery key on the network share.  In order to log-in my machine I need the recovery password. From where i will get the recovery
    password(48 digit). Surely from the recovery key on the network share. So how can i get the recovery password if only we have the recovery key.
    I know both are different in context. Both are two different thing. I have lost my USB stick along with the recovery password and I have to log-in my machine. How can i do that i want to know that. Do there is any method to get recovery password from the
    recovery key on network share. I have retrieved the recovery password when the recovery key in AD. But this time it is on network share.
    Also one think which I need to solve is that the manage-bde -protectors -add command creates a new .bek file along with the older one. So the .bek file which get shown at the time of the start up of the machine is different from that stored in the network.
    So i am getting confused as which .bek file is for which machine and hard to retrieve the password.
    Is there any method to store recovery key on network without the -protectors -add command line so that both the .bek file should be matched and can easily be known for indiviual machine in an OU. As if both the .bek files will be different it would be difficult
    to to retrieve the recovery password for the machines.
    Please do inform if you need some more information about the scenario if i missed something.
    Thanks
    Gaurav Ranjan

  • Open and Close a command line exec via OpenG.lib in seperate VIs

    Hi,
    I'm aiming to perform tests on my UUT - over a command line based executable which established a USB connection, so - sendings commands and checking the return string. 
    So far i'm reusing the pipeNight.vi which is shared in the following post.
    http://forums.ni.com/t5/LabVIEW/How-to-pass-input-to-a-DOS-executable-that-is-running-in/m-p/1763182...
    However i wish expand from LabVIEW and utilise NI-TestStand sequence files to ramp up the test coverage and perform the tests automatically.
    The issue i've encountered - every time i call the pipeNight.vi from a TestStand sequence Step, the USB connection is build up and torn down.
    Although i'm not encountering any performance issues to date, i would ultimately like to open a session (i.e.establish the usb connection) - at the beginning of a sequence file, send a bunch or commands and check return strings, before closing the session at the end of the sequence file. This is surely a more effecient and elegant solution.
    Is it somehow possible to split the pipeNight.vi into several VIs to realise this objective?
    - Open 
    - Write/Read
    - Close
    i'd appreciate and help or alternatice solutions on this!
    B.Regards
    Kech
    Solved!
    Go to Solution.

    I had tried to explain in my initial post, that if i call the pipeNight.vi from a TestStand sequence file step, then establishes a USB connection and tears it done - for every command that i send/ respectively every sequence step that i run in TestStand. As i envisage multiple (several hundred) test steps, i woul like to improve effeciency by establishing the ESB connection once instead of multiple times.

  • How to issue print command from report/form server to client printer on web

    1) We have a client server application which is to be deployed on the web environment. The reports generated in our application are having a destination type as File. These reports are printed after applying some print format (escape sequences) which are passed on to the printer programmatically at runtime while printing.
    Now when this application is shifted on to the Application server (Forms server & Reports Server )in web environment ,the report outputs would be generated in the application server as against the client in client server environment as the report server is on the application server.
    Now while printing/accessing the report the output file will not be available to the client unless it is pushed on to the client side from the server . I am able to see reports in pdf/html output but in this case layout of my reports gets changed and I dont want to change my layouts or reformat my report layouts.
    How do I redirect the report output from the application server on to the client within the D2k context and then execute print commands?
    Note: In this case we want to use both DMT and Laser printing. Also note that we use escape sequences to adjust reports in desired printing papers.
    2) We have second set of reports which we call as document because these are printed after capturing data from 'Form' using text_io utility (please note that for these documents we are not using any Report 6i functionality)and we print it from file using printing mechanism as mentioned above. These are working well in client server application. We adopted this methodology for getting better performance (in terms of speed as database server and network traffic is not involved) of printing. But now we are converting our application for web, we are finding it difficult how to capture Form's data from browser to client's machine and then executing printing commands which are stored in our application liabrary.
    If you help me out by giving some suggestions, I shall be grateful to you.
    null

    Hello
    I wonder if you ever solved this problem.
    I have a very similar problem with Photoshop CS5 on Mac OSX 10.6 + HP Photosmart C7180.
    If I choose "Photoshop Manages Colors" the results are lousy.
    If I choose "Printer Manages Colors" the results are OK. not necessarily great.
    I believe I have all the correct settings after going through books and web advice (and wasted a lot of paper and ink).
    As far as I can see, "ColorSync" is the internal Mac management which is the only option available with "Photoshop Manages Colors" and "Vendor Matching" appears to mean the printer vendor (ie HP) will provide the matching. Either can be selected if "Printer Manages Colors" is used. It seems the type of paper can be set in three different places. if That's all a bit academic as the results are poor regardless.
    My wife suggests I buy a new printer - Epson's looking good.
    Any words of wisdom would be appreciated.

  • When i click on an excel or word file in 2007 the program begins to open but then an error message says There was a problem sending the command to the program

    when i click on an excel or word file in 2007 the program begins to open but then an error message says There was a problem sending the command to the program.
    i am using office2007  with windows7 premium home edition.  i have checked file associations., all DDE settings. i have even tried this in safe mode. the same thing happens. please note once i see the error. i can then go back to the file click on
    it a second time and it WILL open. AND i can open any file if i open excel and and find the file from there. i uninstalled and re-installed office 2007 from scratch. And i checked the compatibility mode (all un-checked) still the problem persisits. this is
    a real PITA.   anyone have any solution for this? Thanks 
    ken yanow

    Hi,
    Have you try to un-select the Ignore other applications that use Dynamic Data Exchange (DDE) setting?
    Click the Microsoft Office Button, and then click Excel Options.
    Click Advanced, and then click to clear the Ignore other applications that use Dynamic Data Exchange (DDE)
    check box in the General area.
    Click OK.
    If the problem cannot resolve, the Run as administrator may selected.
    Go to Office default install location: C:\Program Files\Microsoft Office\Office12.
    Right-click EXCEL.EXE > Properties >
    Compatibility tab.
    Under Privilege Level, uncheck Run this program as an administrator
    check box.
    Best regards.
    William Zhou
    TechNet Community Support

  • How do I add a close command to multiscreen layouts?

    I need to add a close command multiscreen HTML5 screen layouts that will work on multiple platforms and browsers. I have 3 screen layouts defined: Desktop, Tablet, Mobile. These are called by a responsive design web application and display based on the screen width of the platform calling the help. My problem is that there is a requirement to be able to close the help. To do this I have added the javascript code:
    </a>
           <a href="javascript:window.close()" class="wPrintButton"><img
           src="Close.png" alt="" class="wPrintButton" border="0" />
    in each of the layouts to allow the user to close the help browser tab/window.
    My Desktop layout is based on the stock desktop. I added this command Topic.slp and SearchResults.slp d just to the right of the Print icon.
    My Mobile lay out is based on the stock iPhone. I added this as an additional row in the homepage links to the Home.slp.
    My Tablet layout is based on the stock iPad. Again I added this as an additional item to the homepage links to the Home.slp.
    My problem is - it appears that the window.close() javascript will not work with iOS. Has anyone incountered a similar problem and how did you deal with it?

    I had another idea that I am pursuing. I am looking into extending the current renderer CommandNavigationRenderer and will render another goLink just after the current goLink that will execute a close action. I was able to re-direct the rendering by added an override render-kit block in my current faces-config.xml file.
    <render-kit>
    <renderer>
    <component-family>org.apache.myfaces.trinidad.Command</component-family>
    <renderer-type>oracle.adf.rich.NavigationItem</renderer-type>
    <renderer-class>com.riscs.ui.backing.jsp.components.ClosableCommandNavigationItemRenderer</renderer-class>
    </renderer>
    </render-kit>
    If this works I am planning on extending the commandNavigationItem by creating a ClosableCommandNavigation tag and add a "closeAction" tag that will determine if a close item should render.
    Preliminary work looks promising. I will update if I make progress...please let me know if I am crazy.
    Thanks.

Maybe you are looking for