I need applescript to change all files in a folder and its subfolders ending in .xlsx changed to .xlsb

I need applescript to change all files in a folder and its subfolders ending in .xlsx changed to .xlsb

try something like this:
with timeout of 3600 seconds
  -- long timeout to because the Finder is horribly slow
          tell application "Finder"
  -- collects the files from a folder called "whatever" in your user home folder
                    set xlsbFiles to every file of entire contents of folder "Whatever" of home whose name extension is "xlsb"
                    repeat with thisFile in xlsbFiles
                              set name extension of thisFile to "xlsx"
                    end repeat
          end tell
end timeout
you could make a more efficient script using System Events.app, but this will get the job done with a minimum of thought.

Similar Messages

  • Show Thumbnail of all files in a folder and its subfolders

    Hi Guys,
    I want to set the Filter Panel (Adobe Bridge CS3) to "show all items in this folder and all its subfolders" through Java script on windows.
    From UI it is possible by clicking on icon buton present in the filter panel and content panel shows the files from current folder as well as from its subfolders.
    Can any one suggest some Java script to do it?
    -P. M. Mitchell

    Any solution?
    Good Luck.
    My
    Si
    tes

  • Walk through all files in a folder and do this for all subfolders and...

    ... and their subfolders, etc. I mean I want to recursively walk through all subfolders of a folder and when I'm "in" in each folder I would like to walk through all files alphabetically of that folder.
    While iterating through the files (of a certain type: .mp3, .mp4, .m4a) of that folder, I need to make a simple counter. e.g. when counter is 3 it means we are on the 3rd file alphabetically of the folder.
    Then I simply want to set the track # mp3 tag of that file to this counter value (e.g. 3)
    Anyone know how to do this? or at least to be able to show me the walking the folders and iterating the files bit? I'm brand new to applescript.
    Why do I want to do this? Well I have a lot of live music shows, each in its own folder, but in my apple devices and itunes when I play a show it will not show the songs in the correct order. The file names are alphabetical in the correct order though and I suspect if I assign track #s then itunes, ipods and iphones will be able to play the "album" back in the order listed by track #??

    What are you using to play your items? iTunes can use various properties to sort a playlist, independent of what the file name is (Finder too, for that matter). If you are just wanting to add a prefix number to a file name, you would also probably need to use leading zeros to keep it in order when sorted by name.
    The following is a general purpose handler to go through the items in a folder - I just put various text into the output list as an example.
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 340px;
    color: #000000;
    background-color: #FFEE80;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    on run -- example
    set TheFolders to (choose folder with multiple selections allowed)
    choose from list (ProcessStuff from TheFolders)
    end run
    to ProcessStuff from SomeItems
    process items contained in SomeItems, recursively descending the directory tree
    parameters - SomeItems [list]: the items to process
      returns [list]: a list of processed items
    set FilesList to {} -- this will be a list of processed items
    repeat with AnItem in SomeItems
    set AnItem to AnItem as text -- get the contents
    set FileInfo to (info for AnItem as alias) -- see Standard Additions
    if (folder of FileInfo) and not (package folder of FileInfo) then -- a folder (not a package)
    -- do something with the folder, if desired
    set the end of FilesList to "folder  " & AnItem
    try -- sort and process contents, skipping any errors
    tell application "Finder"
    set SubItems to (get items of folder AnItem)
    set SubItems to (sort SubItems by name) as alias list
    end tell
    set FilesList to FilesList & (ProcessStuff from SubItems)
    end try
    else -- a file
    -- do something with the file, if desired
    set the end of FilesList to tab & (name of FileInfo)
    end if
    end repeat
    return FilesList
    end ProcessStuff
    </pre>

  • Missing all files of a folder and the pst file cannot be repaired

    All files under folder Inbox\TechSupport suddenly are missing.  The Folder Size window shows this folder has a size of 180719KB.
    I used "C:\Program Files\Microsoft Office\Office15\SCANPST.EXE" to try to fix the post files a few times, the problems remains.  No matter how many times I run SCANPST.EXT on this pst file, it always find the following error:
    Internal errors were found in this file. They must be repaired for this file to work correctly.
    Here is the log:
    Microsoft (R) Inbox Repair Tool
    © 2012 Microsoft Corporation. All rights reserved.
    Version 15.0.4667.1000
    **Beginning NDB recovery
    **Attempting to open database
    **Attempting to validate header
    **Attempting to validate AMap
    !!AMap page <@416752640> has csFree of 7, but should have 255
    **Attempting to validate BBT
    **Attempting to validate NBT
    **Attempting to validate BBT refcounts
    **Attempting to validate header NID high-water marks
    **Beginning PST/OST recovery
    **Attempting to recover all top-level objects
    **Store created by build: 15.4667
    **Attempting to walk all folders
    **Attempting to locate any orphaned folders/messages
    **Performing final HMP validation
    **Attempting to check top-level objects for consistency
    **Updating folder hierarchy
    **Attempting to fix original file
    **Attempting to copy back BBT
    **Attempting to copy back NBT
    Any tip to remedy this will be greatly appreciated.
    Hong

    Thanks for the update, Hong.
    If we copy some emails to TechSupport folder, are those emails still visible in the TechSupportfolder?
    Although it doesn't look like a view problem, we may also try to open Outlook with /cleanviews switch to seek our fortune. To do this, exit Outlook, press Windows key + R to open the Run command, type
    outlook /cleanviews and press Enter. We may also try to search for the missing emails using Instant Search to see if there is any result.
    In addition, we may also try to use the MFCMAPI tool to look into the TechSupport folder and check if we can see and open the missing emails. To do this, please follow the steps below:
    1. Download MFCMAPI tool: http://mfcmapi.codeplex.com/
    2. Exit Outlook and start MFCMAPI.exe.
    3. Click Session > Logon, choose your profile and click
    OK.
    4. Double-click the PST file that has this issue from the list.
    5. In the opened new window, expand Root Container > Top of Outlook data file > Inbox.
    6. Find and right-click the TechSupport folder under Inbox, select Open contents table.
    7. In the opened new window, check if you can see your emails in the upper portion of the window. If so, double-click an item to see if you can open the email in Outlook window.
    Please let me know the result.
    Regards,
    Steve Fan
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click
    here

  • Accessing All Files in a Folder and Deleting Old Files

    My problem is that I have an applet that communicates with a servlet and the servlet stores user designed objects on the server. These objects are piling up and the older ones are no longer useful. What I want to do is have a method in the servlet that periodically scans this folder and deletes files that are over two months old. Any advice on how I could do this is greatly appreciated.
    Thanks!

    I think it's Linux, but I'm not sure. This is for a job that was done a while ago and I'm just revisiting to touch up a few things.

  • Can I get a count of all files in a folder, including in subfolders?

    I know the various ways to get a count of items in a folder. This gives me the number of files and subfolders. Is there a way to include the number of files in the subfolders in the total folder count?

    I also found that, here: http://superuser.com/questions/198817/recursively-count-all-the-files-in-a-direc tory
    That will give you the count of just files, excluding the folders.
    If you want to count the non-hidden files, you can do this:
    find path/ -type f ! -name ".*" -flags nohidden | wc -l

  • Process all files in a directory and its subdirectories

    Hello all,
    I want to write a program that processes separately all the files in a given directory. I would like to open folders in that directory (if any) and further process all the files contained in them as well. Any suggestions with some Java code to do this as time effectively as possible? Thanks in advance.

    Hello Chuck,
    thanks for answering. You probably meant: "Search the forum archive - maybe your question has already been discussed. This way you help people focus on topics that have not yet been resolved."
    Generally http://forum.java.sun.com/thread.jspa?forumID=31&threadID=510545 suits well. My problem is however, that I would like to pass the absolute path (not the relative one) of the directory which content (including subdirectories if any) should be further processed. Any suggestions how to make it function with the absolute path passed as input argument to the program?

  • Script to search all files in specified folder for multiple string text values listed in a source file and output each match to one single results txt file

    I have been searching high and low for this one.  I have a vbscript that can successfully perform the function if one file is listed.  It does a Wscript.echo on the results and if I run this via command using cscript, I can output to a text file
    that way.  However, I cannot seem to get it to work properly if I want it to search ALL the files in the folder.  At one point, I was able to have it create the output file and appear as if it worked, but it never showed any results when the script
    was executed and folder was scanned.  So I am going back to the drawing board and starting from the beginning.
    I also have a txt file that contains the list of string text entries I would like it to search for.  Just for testing, I placed 4 lines of sample text and one single matching text in various target files and nothing comes back.  The current script
    I use for each file has been executed with a few hundred string text lines I want it to search against to well over one thousand.  It might take awhile, but it works every time. The purpose is to let this run against various log files in a folder and
    let it search.  There is no deleting, moving, changing of either the target folder/files to run against, nor of the file that contains the strings to search for.  It is a search (read) only function, going thru the entire contents of the folder and
    when done, performs the loop function and onto the next file to repeat the process until all files are searched.  When completed, instead of running a cscript to execute the script and outputting the results to text, I am trying to create that as part
    of the overall script.  Saving yet another step for me to do.
    My current script is set to append to the same results file and will echo [name of file I am searching]:  No errors found.  Otherwise, the
    output shows the filename and the string text that matched.  Because the results append to it, I can only run the script against each file separately or create individual output names.  I would rather not do that if I could include it all in one.
     This would also free me from babysitting it and running each file script separately upon the other's completion.  I can continue with my job and come back later and view the completed report all in one.  So
    if I could perform this on an entire folder, then I would want the entries to include the filename, the line number that the match occurred on in that file and the string text that was matched (each occurrence).  I don't want the entire line to be listed
    where the error was, just the match itself.
    Example:  (In the event this doesn't display correctly below, each match, it's corresponding filename and line number all go together on the same line.  It somehow posted the example jumbled when I listed it) 
    File1.txt Line 54 
    Job terminated unexpectedly
     File1.txt Line 58 Process not completed
    File1.txt
    Line 101 User input not provided
    File1.txt
    Line 105  Process not completed
    File2.txt
    No errors found
    File3.txt
    Line 35 No tape media found
    File3.txt
    Line 156 Bad surface media
    File3.txt Line 188
    Process terminated
    Those are just random fake examples for this post.
    This allows me to perform analysis on a set of files for various projects I am doing.  Later on, when the entire search is completed, I can go back to the results file and look and see what files had items I wish to follow up on.  Therefore, the
    line number that each match was found on will allow me to see the big picture of what was going on when the entry was logged.
    I actually import the results file into a spreadsheet, where further information is stored regarding each individual text string I am using.  Very useful.
    If you know how I can successfully achieve this in one script, please share.  I have seen plenty of posts out there where people have requested all different aspects of it, but I have yet to see it all put together in one and work successfully.
    Thanks for helping.

    I'm sorry.  I was so consumed in locating the issue that I completely overlooked posting what exactly I was needing  help with.   I did have one created, but I came across one that seemed more organized than what I originally created.  Later
    on I would learn that I had an error in log location on my original script and therefore thought it wasn't working properly.  Now that I am thinking that I am pretty close to achieving what I want with this one, I am just going to stick with it.
    However, I could still use help on it.  I am not sure what I did not set correctly or perhaps overlooking as a typing error that my very last line of this throws an "Expected Statement" error.  If I end with End, then it still gives same
    results.
    So to give credit where I located this:
    http://vbscriptwmi.uw.hu/ch12lev1sec7.html
    I then adjusted it for what I was doing.
    What this does does is it searches thru log files in a directory you specify when prompted.  It looks for words that are contained in another file; objFile2, and outputs the results of all matching words in each of those log files to another file:  errors.log
    Once all files are scanned to the end, the objects are closed and then a message is echoed letting you know (whether there errors found or not), so you know the script has been completed.
    What I had hoped to achieve was an output to the errors.log (when matches were found) the file name, the line number that match was located on in that file and what was the actual string text (not the whole line) that matched.  That way, I can go directly
    to each instance for particular events if further analysis is needed later on.
    So I could use help on what statement should I be closing this with.  What event, events or error did I overlook that I keep getting prompted for that.  Any help would be appreciated.
    Option Explicit
    'Prompt user for the log file they want to search
    Dim varLogPath
    varLogPath = InputBox("Enter the complete path of the logs folder.")
    'Create filesystem object
    Dim oFSO
    Set oFSO = WScript.CreateObject("Scripting.FileSystemObject")
    'Creates the output file that will contain errors found during search
    Dim oTSOut
    Set oTSOut = oFSO.CreateTextFile("c:\Scripts\errors.log")
    'Loop through each file in the folder
    Dim oFile, varFoundNone
    VarFoundNone = True
    For Each oFile In oFSO.GetFolder(varLogPath).Files
        'Verifies files scanned are log files
        If LCase(Right(oFile.Name,3)) = "log" Then
            'Open the log file
            Dim oTS
            oTS = oFSO.OpenTextFile(oFile.Path)
            'Sets the file log that contains error list to look for
            Dim oFile2
            Set oFile2 = oFSO.OpenTextFile("c:\Scripts\livescan\lserrors.txt", ForReading)
            'Begin reading each line of the textstream
            Dim varLine
            Do Until oTS.AtEndOfStream
                varLine = oTS.ReadLine
                Set objRegEx = CreateObject("VBScript.RegExp")
                objRegEx.Global = True  
                Dim colMatches, strName, strText
                Do Until oErrors.AtEndOfStream
                    strName = oFile2.ReadLine
                    objRegEx.Pattern = ".{0,}" & strName & ".{0,}\n"
                    Set colMatches = objRegEx.Execute(varLine)  
                    If colMatches.Count > 0 Then
                        For Each strMatch in colMatches 
                            strText = strText & strMatch.Value
                            WScript.Echo "Errors found."
                            oTSOut.WriteLine oFile.Name, varLine.Line, varLine
                            VarFoundNone = False
                        Next
                    End If
                Loop
                oTS.Close
                oFile2.Close
                oTSOut.Close
                Exit Do
                If VarFoundNone = True Then
                    WScript.Echo "No errors found."
                Else
                    WScript.Echo "Errors found.  Check logfile for more info."
                End If
        End if

  • Need help in laoding flat file data, which has \r at the end of a string

    Hi There,
    Need help in loading flat file data, which has \r at the end of a string.
    I have a flat file with three columns. In the data, at the end of second column it has \r. So because of this the control is going to the beginning of next line. And the rest of the line is loading into the next line.
    Can someone pls help me to remove escape character \r from the data?
    thanks,
    rag

    Have you looked into the sed linux command? here are some details:
    When working with txt files or with the shell in general it is sometimes necessary to replace certain chars in existing files. In that cases sed can come in handy:
    1     sed -i 's/foo/bar/g' FILENAME
    The -i option makes sure that the changes are saved in the new file – in case you are not sure that sed will work as you expect it you should use it without the option but provide an output filename. The s is for search, the foo is the pattern you are searching the file for, bar is the replacement string and the g flag makes sure that all hits on each line are replaced, not just the first one.
    If you have to replace special characters like a dot or a comma, they have to be entered with a backslash to make clear that you mean the chars, not some control command:
    1     sed -i 's/./,/g' *txt
    Sed should be available on every standard installation of any distribution. At lesat on Fedora it is even required by core system parts like udev.
    If this helps, mark as correct or helpful.

  • HELP. ............Hi folks hope some one can help me please.Having a problem in Bridge I open my images in ACR,  as I open files in a folder and lets say they are labeled in yellow  they are all going back to  the camera raw default , in other words no ma

    HELP. ............Hi folks hope some one can help me please.Having a problem in Bridge I open my images in ACR,  as I open files in a folder and lets say they are labeled in yellow  they are all going back to  the camera raw default , in other words no matter what work I have done, inc cropping they  all go back to ,as they came out of camera. What on earth is happening? I am on PS CS6. I might point out everything was working normally up to  yesterday, when this first started.
    I recently changed computer to 64bit from 32bit, not sure if this causing  the problem or not. Any help would be appreciated.

    Robert,
    Would you be so kind to rephrase your question with concise, precise information and without any "let's say that" hypotheticals?  Sorry, I can't quite follow you.
    Also please give exact versions of Photoshop CS6 (13.what.what), of Bridge and of your OS.
    Thanks.
    BOILERPLATE TEXT:
    If you give complete and detailed information about your setup and the issue at hand, such as your platform (Mac or Win), exact versions of your OS, of Photoshop and of Bridge, machine specs, what troubleshooting steps you have taken so far, what error message(s) you receive, if having issues opening raw files also the exact camera make and model that generated them, etc., someone may be able to help you.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • Disk utility can't repair the Macintosh HD, asking toback up all files as possible? and how to  reformat the disk?

    disk utility can't repair the Macintosh HD, asking toback up all files as possible? and how to  reformat the disk?

    Some problems can indeed be fixed this way. But working from Recovery_HD or Disk Warrior DVDs and working in the restricted environment those provide can be difficult. You can literally spend days working on this problem (while your regular work is unavailable) only to discover the old drive is unsalvageable.
    There is no way to know up front whether you are facing a major Hardware failure or a minor software glitch, or something in between. Often you are forced to work from the drive you no longer trust. I continue to recommend you do this work from a different, fully functioning Mac OS X booted from a different drive.
    If you have had the foresight to (as The hatter often recommends) clone your virgin install onto another drive for use in such situations, you will be able to recover from such problems in record time. If not, my previous recommendations stands:
    Buy a new Drive. Or  two. Install Mac OS X from scratch on a new drive, and get your Mac running again. Later, you can use the full power of Mac OS X to attempt to rescue your data, if needed. Then Zero the old drive, to see if it can hold data again reliably.
    If the old drive eventually provides some needed data, and is salvageable, Merry Christmas.

  • [Solved] Foreach loop that loops over all files in a folder does not consider first file found

    Hello,
    I have a foreach loop in SSIS (as part of Visual Studio 10 and with SQL Server 2012).
    It loops over all files in a folder (ForEach File Enumerator).
    I set the folder: OK
    Traverse Sub folders: OK
    I have set up a Variable in Variable Mappings called FileName so it shows User::FileName: OK
    Index of variable is 0: OK
    It almost works ok. Except that the first file it finds is never considered.
    I set a breakpoint then and the first file it finds, is shown in black in the watch variable window. All subsequent files found are shown in red font. When I change the names of the files so another file is the first file found then it skips the other one
    which now is the first file.
    What is going on here? Why does SSIS skip the first file it finds in a foreach file loop?
    Any suggestions highly appreciated.
    Thank you
    Andi
    Andreas

    "red font - interesting, any example to show us (image)
    It would be interesting to share with us whether you use any file masks or expressions.
    Arthur
    MyBlog
    Twitter
    It appears a variable value turns red when it changes between breakpoints. It started black for the first value (the first file, obtained BEFORE the execution reached the breakpoint), and then turned red. I was able to reproduce this behavior on a test environment.
    However, it did not skip any files.
    OP, please set up the test shown in the image below. Create a breakpoint in the sequence container for the "OnPreExecute" event.

  • 10.6.4:  how to unlock all files in a folder

    hi,
    how do you unlock all files inside a folder?
    thank you..

    thank you.. (I wonder why you can't just do it by getting info on the folder, then saying, unlock all files inside.. (u can do like that in windows) this is always more practical than having to select all files (and accidentally opening them, or something...-) in windows you can select a folder and then say, (un)lock all files and and dirs -- and subdirs and files inside -- inside this folder.. can u do something like this in mac os? if not, that's not very good.. (I guess on the mac would need to find unix commands for doing something like this..)
    they really need to consider this for future versions, this is a no-brainer...;-)
    thank you..

  • Is possible search all the files in one folder and get list all with the same extension.??

    Hi,
    I would like to get, if it is possible, do searching in one determinate folder and get all the files with the same extension, For example, Give the *.pou and get all the files on one list of the files in this folder and sub-folders...
    If it is possible i would like to see any example.
    Thanks a lot, Fonsi.

    Hi Dennis,
    I got your advise, I download the openG (i had problems, and downloading directly and install one to one).
    Ok, i got but i have one problem, which i can't solve. I entry the promt  to search and put the directory to save, later i push 'Do it' and it search the files, show the paths and number, then save in the folder and finally show the window , all ok!.
    The problem is with the target path, when i want use the browse, it doesnt run properly. I want select one carpet, and it demands one file, i dont understand why??, i changed the options browse but it didnt work. Also i would like when i put one path if folder doesnt exist, directly create it and save the files, if exist copy it.
    Thanks for all!. I attached the file in lv 7.1
    Attachments:
    buscar3.vi ‏50 KB
    capture.GIF ‏48 KB

  • My 5 year old MacBook Air is telling me it "cannot save information about your mailboxes because there isn't enough space in your home folder.  Quit mail, delete files you don't need, then reopen mail."  What is "home folder," and which files to delete?

    My 5 year old MacBook Air is telling me it "cannot save information about your mailboxes because there isn't enough space in your home folder.  Quit mail, delete files you don't need, then reopen mail."  What is "home folder," and which files to delete? Thanks.

    The home folder is where all of your personal files are kept.
    Best candidates to delete are movies, videos, music and photos since they generally take the most space.
    Don't forget to empry the Trash after you delete the file because the space is not returned until the Trash is emptied.
    Allan

Maybe you are looking for

  • G5 Quad hard drive may be dead - what should I do?

    Yesterday my Quad froze up. I rebooted and got a screen full of code. I stepped back and a ran Hardware Test. It didn't find a problem. The local Genius Bar notices a 'clicking' sound and suggested that the hard drive may have failed. My question: Wh

  • How can I get rid of spinning colored balls on my Desktop computer

    How can I get rid of spinning colored balls on my Desktop Mac, it is really bogging down my system.

  • Runtime Error for Set text container

    Hi I'm receiving a runtime error in IE for a set text for container. Works in Firefox and Safari. IE dubugging says its line 17 (which is the last line of code):

  • 1Z0-117 topics

    Looking at http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=5001&get_params=p_exam_id:1Z0-117&p_org_id=&lang= , i noticed that the principal categories of topics are SQL Statement Tuning and Parallel Queries (those with red).

  • Broken airport card and hard drive on MacBook Pro and can't go to recovery with LAN.

    Hi. My MacBook Pro 13" (early-2011)'s hard drive has broken, and I bought a Kingston 120GB SSDNow instead. Earlier, the airport card and cable has been broken too. Are there other ways I can use LAN to recover my mac? It wants me to use wifi, but the