AppleScript remove spaces replaced by underscore

I run this Applescript in an applet and it works fine apart from the fact that it only changes the HALF of the file names. So if you run it again it made HALF of those then HALF again and so on. Someone at - it any idea or a better way to achieve the goal?

point of the value defDel to AppleScript text delimiters

say application 'Finder '.

Folder to Set folder (choose the folder)

Repeat with thisItem in Folder

set theName in the name of thisItem

If thename contains "" then

the value Point text delimiters to AppleScript ""

set newname to the textual elements of thename

the value Point text delimiters to "_" to AppleScript

set name of thisItem to (newname as string)

the value Separators to AppleScript text point defDel

end if

end Repeat

end say


Thanks in advance!

Some heavy Applescripter will have comments on it.

[I'll wait a bit and if no one comes along, I'll get someone].

mac $ mkdir checkitout
mac $ cd checkitout/
/Users/mac/checkitout
mac $ touch "abc abc"
mac $ touch "abc 123 abc 123"
mac $ touch "abc    abc"
mac $ touch abcdef
mac $ touch nothing

Tags: Mac OS & System Software

Similar Questions

  • G61 does not illuminate unless I have remove and replace the battery.

    Even when the power cord plugged in it will not light. If I remove and replace the battery it lights mode battery and AC. At the same time my HP Support Advisor and HP s Advisor "stopped working".

    I restore to a previous point, no help. Downloaded a new HP advisor, ho help.

    This happened after the recent big WIN7 updated. Help

    Hello

    In the Menu start, open the all programs, open accessories, right-click on command prompt and select "run as Administrator".  In at the prompt, type the following command and press ENTER.

    sfc/scannow                (Note that there is a space between sfc and /)

    Let the entire process, then the output type and press ENTER.  Stop the laptop, unplug the AC adapter unplugged, remove the battery and then press and hold the power button for a minute.

    Now, plug in the AC adapter without the battery inserted, start Notepad, open windows control panel, open Device Manager, expand the entry for the battery, on the right, click on and compatible Microsoft ACPI control method battery and select Uninstall - do uninstall not something else here.  When the uninstall is complete, shut down the PC, unplug the AC adapter, reinsert the battery and then start the PC on just the battery.  Windows will automatically reinstall the driver - leave Windows running for a few minutes. Shut down the PC again.  Now plug the power adapter (with the inserted battery always) and start the laptop to see if it helped the issue at all.

    Kind regards

    DP - K

  • Satellite A30 921: how to remove and replace the memory?

    Hi, can someone help me how to remove and replace the memory of satellite A30 921. and also, please give a detailed instruction.

    Thank you in advance.

    Hello

    There is not much to explain. On the low side in the Middle it is placed to cover memory (fixed with two screws). Remove the cover and you will see 2 slots there. I put t know how much memory you here but like Stefan says you can use max 2 GB of RAM (2 x 1024Mo PC2700 - PA3313U-1M1G). How to remove the memory modules, which you can see on http://www.hardwaresecrets.com/article/189/5

    Good bye

  • Laptop HP Touchsmart 15-D020: how to remove and replace the keyboard on laptop HP Touchsmart 15-D020NR

    I spilt a drink on my keyboard and now I can not turn off the caps lock and a number of keys does not work. I need instructions on how to remove and replace the keyboard frame. Thank you.

    On your page of support-look for Maintenance and Service of Guide in the manuals.

    http://support.HP.com/us-en/product/HP-15-D000-TouchSmart-notebook-PC-series/6627588/model/6761859/manuals

  • Remove or replace (NOT append) data channels PDM

    Is there a way to delete the channel that has already been written to a TDMS file data?

    Simply write the tot data new data channels appears to add the new to the old.

    I don't see a way to remove OR replace the old with the new dat.

    Ben

    Hi markza,

    See this example and see if it's what you need:

    http://decibel.NI.com/content/docs/doc-5735 (Remove single channel TDMS since an existing PDM file)

    Have a great day,

    Chris

  • Steps to remove and replace the keyboard. HP Pavilion dv7-1448dx

    Hello. I have HP Pavilion dv7-1448dx. I have not available a manual where the path is directed to change the laptop keyboard. I need help to get the steps to remove and replace the keyboard. Please provide me with the support as soon as possible so that I can solve this problem. Thank you.

    Link to the .pdf manual

    Click above. We are not HP, all other users trying to help.

  • cartridge in the slot on the left is not intended to be used with this printer. Remove and replace

    Hello

    After using my printer on a regular basis and without any problem, I suddenly had this coming message: "cartridge in the slot on the left is not intended for use in this printer. Remove and replace.

    I have a computer that is running Windows 7, 64-bit and the cartridges that I use are all genuine HP cartridges, black and tricolor cartridges are XL.

    What surprises me the most, is that the left cartridge is not empty, I without touching it, there was no jam paper, or any other poor behaviour of the printer. It happened just in the middle of printing, the printer just finished a job, and was about to start the second in the queue. Maybe this detail can help or it's just a coincidence...

    Thank you for your help

    Tonphilou

    Hello

    Please follow the steps in the document below.

    http://support.HP.com/us-en/document/c00042821

  • How to remove and replace the internal Blu - Ray DVD RW drive on laptop HP HDX 16 t

    The internal dvd player does not work and I would like to remove and replace it myself. If anyone has a method step by step for me, or links to pictures or videos of the steps, I'd appreciate it. Thank you

    RayCE

    There is a screw on the bottom of the laptop that holds the drive in the screw about 4 inches from the front of the dvd player door.on the botom of the machine, remove the screw and remove the disc.

  • Question: Remove spaces from |

    I have a table that has a column named NAME and under it contrain a list of names.
    NAME
    Ann Pert
    Steven Pappas
    Mai Xiong
    I'm trying to join this table to the other which contrain one list of names as well, but they are in the format of the first NAME and last NAME in separate columns
    FIRST NAME     LAST NAME
    ANN               PERT
    STEVEN              PAPPAS
    I'm trying to do something like:

    Select *.
    TABLE_NAME FROM HAS, TABLE_NAME B
    WHERE B.SID = B.FIRST_NAME | B.LAST NAME

    But because there is a space between the first and the last name in the table A is not picking up. So is there a way to remove spaces from | or another method

    (I have not uplad a DataSet because it's just an issue that seems easy to answer)
    Using oracle 10

    Why not just concatenate fisrt name + space + family name:

    Select *
    FROM TABLE_NAME A, TABLE_NAME B
    WHERE A.NAME = B.FIRST_NAME || ' ' || B.LAST NAME
    /
    

    SY.

  • removed and replaced index page old index is always on the web

    removed and replaced index page old index is always on the web. I just after a new website, but BusinessCatalyst blinking an error message to fast as follows by saying I can't. I thought Muse for coders and technicians.

    Steven,

    The page could be cached in other places, such as cache network or your internet provider.  These are rare cases, but they happen, and you have no control over it.  Best to have friends / colleagues check from another place, this page has been replaced by fact.  If you have several locations showing the same old page, which means the page was either not removed properly, or home page of the site is perhaps used a different directory than where you are currently working.  It is common for people to create several directories test when booting with web creation programs and forget the one that serves content for the online site.

  • How to remove and replace the missing keys Sat A30

    Hey folk,
    I guess that sounds simple, but I have just no idea.
    Broke and need to replace a couple of keys on my keyboard UK A30. At present, all what I have in place are the rubber bubble popper & locators of metal set in the empty spaces.
    The keys in question are the shift (I have no u lying in spring form) and? + / keys of RHS of KB.

    I have complete German and American replacement KBs, but to remove the necessary keys on the part and repair the United Kingdom KB.

    I don't want to end up with 3 broken KBs

    So I need clear and detailed instructions on removal and then reset the necessary keys.

    Any help or direction to the site that contains this kind of info would be greatly appreciated. Or response message directly by email to

    [email protected]

    Thank you very much.
    sparkiefive

    Hello

    I think you should go to a Toshiba Service partner.

    You can find them here:
    https://EU.computers.Toshiba-Europe.com
    Downloads support & - find an approved service

  • How to remove spaces between two separators

    Hi all

    How to remove the spaces between two separators, but space is required between the characters.

    I have an input as string below

    "# ABC DEF GHI # JKLMN.

    Expected string as below. Here the space between DEF GHI is required, but other spaces must remove.

    "ABC #DEF #JKLMN GHI".

    I tried with REPLACE it but it removes all spaces and this is a mistake.

    REPLACE ('ABC # DEF GHI # JKLMN', ' ')

    Please guide me. Thank you.

    For example, if the hash/pound symbol may not have a space before and after, then you need to change the regular expression to use ' * ' instead of ' + '...

    SQL > ed
    A written file afiedt.buf

    1 Select trim (regexp_replace ('ABC # DEF GHI #JKLMN',' (* # *) ',' #'))
    2 * of the double
    SQL > /.

    (REGEXP_REPLA TRIM
    -----------------
    ABC #DEF #JKLMN GHI

    Always be clear in your requirements.

    Re: 2. How can I ask a question in the forums?

  • Stripping spaces replaced with dashes

    Hoping that this is fairly easy! you use an image to download my media and I want the name of the image to be match name downloading of media. example Media Download name: my file name multimedia image: My-media - fichier.jpg how do I remove the {{item.name}} "' replace by ' par ' ''"

    Magazines

    {module_literature filter = 'class' itemId = "58993" collection = model "mediaCatalogues" =""}

    {% for article on reverse mediaCatalogues.items-%}
    {{item.name}}

    {{item.name}}

    {{item.description}}

    View Download ({{item.fileSize}} KB)           
    {% endfor}

    Thanks, Luke

    {{item.name | downcase: replace:' ', '-': Strip}}

    If your making all lowercase, replace any space with one - and then stripping to remove all free space

  • Regular expression to remove space after the tag < a... >?

    Hello

    I'm relatively new to using regular Expressions, but am in need who will help me find all the tags < a... > with space immediately after this tag and replace it with the exact same tag, but not space after the tag < a... >.

    Thus, for example, a regular expression that there is:

    < a href = "somelink.html" > Somelink < /a >

    as well as:

    "< a href =" # "MM_swapImgRestore" onmouseover = "MM_swapImage (' sub-nav_button_professional_portal',", ' images/sub-nav_button_ professional_portal_f2.png', 1 ') "> Somelink < /a >

    And just remove the space in the hyperlink.  Does anyone know how to do this?

    Find-

    \ (.*)\

    Replace-

    $2

    Post edited by: Murray * CPA *.

  • Want desolde/resolder, remove and replace the two damaged usb2 ports

    I have a Sat A30 perfect by all means other than 2 USB2 ports on the back that are damaged (black plastic seperaters between connectors jumped) not quite sure why this happened because I was simply unplug the connected usb plugs on both occasions.

    The connectors were not especially tight. fault is I have no insulation between copper connectors which are still found in the slots and causes a short circuit, when I plug in a usb device.

    I bought a card mother relpacement (damaged) and usb2 connections are OK! Have good technician experience in carring out Soldering/desoldering and has all the tools. Problem is that I have not the slightest idea what connections under the Board of Directors are required to unsolder my damaged usb2 card in order to remove/swop and perform the necessary replacement.

    I'm sure I'll be advised to contact an authorized reseller of Tosh. I tried this and they say that they will be already only the motherboard together and the cost is horrible. I would rather make the repair myself that's not rocket science.

    The techies out there who could counsel with picture of the relevent pins to desoldering in order to remove and repair the fault would be greatly appreciated.

    E-mail: [email protected]

    If you can help in any way or point me in the right direction to go repair.

    I hope someone can help. Thank you very much
    Stewart

    Hello

    Please don't be crazy about me, but in my opinion, is not a very good idea to open the notebook alone if you don't have a lot of experience with it. Laptops are designed on the specific way and exchange of material is not so easy as the exchange of material to work stations.

    Believe me that a small error in the assembly/disassembly procedure can case damage to equipment or the façade of the same laptop parts. I know that there's not much service partner assistance because they want to do. It costs money, but you must understand that if they give that kind of advice or information they may close the shop very soon.

    You can try to do it alone, but at your own risk and be careful.

Maybe you are looking for

  • Latest firefox won't let me access any page search engine or https

    Windows 10 o/s x 64 laptop Sony Viao. Full AVG anti-virus. The latest version of Firefox won't let me access any search engine, all (even Google) are unreliable. Clicking on a tab secure htpps also gives the same message and don't make an exception.I

  • How to export a book done in opening a similar book in pictures?

    I was extremely disappointed today by getting a message telling me that I can no longer order books photo of my program of opening (3.6) to Apple print services because it is no longer supported. More than a week ago, I finished a book for a client d

  • Is W550s - possible to update the graphics card on laptop?

    Is it possible to update the graphics card on a W550s? Mod edit: System model added to the front of the subject line to improve visibility / clarity. Moved to post on the correct Thinkpad forum for better response

  • HP envy 4507: pipeline of filters stop printing and closes

    Hello having only bought my printer yesterday ive been using it does not this morning that now he stopped to tell the filter pipeline host and close. can someone please. I am based on windows vista. I am not that technically minded so would appreciat

  • File .pdf of blackBerry Smartphones use for bold 9900 os 7.0

    Hi all Please help me. I have a bb bold 9900, os 7.0 version. It is written that the document .pdf reader comes pre-installed with documents to go premium, which is a resident. I tried, but I can't open .pdf documents. Then I tried to openn www.datav