CFDirectory Sort By File Extension

Does anyone know how to sort files in a CFDirectory by File
Extension (.gif, .jpg... etc)?

i think the only way to do it with just cf will be:
1) run cfdirectory to get the dir structure
2) loop through the result
3) populate a temp query with values from cfdirectory query
and an extra
field with value of #right(cfdirectoryquery.name, 3)#
4) run QoQ on the temp q with ORDER BY on the extra field
other than that, look into java - it has ways to work with
directories/files which are a lot more comprehensive than
CF's...
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com

Similar Messages

  • "Sort by File Extension" not working

    In my v1.4, I've lost the "ability" to sort by file extensions ... it just sorts by file name when I select this.
    I have used it to edit my pics from my D3 (.nef), my pics from an old S3 set to in-cam B/W (.jpg), and my wife's S5 (.raf).
    This used to work, and now it doesn't do a thing. What happened, or at least, how do I get that functionality back?
    Neil

    I've tried that, but it seems to want to give me EVERY image in the catalog with that situation ... here, I ONLY want the ones in the current folder.
    Am I missing something?
    Neil

  • Sum of file sizes; based on file extension, sorted by size

    Hello,
    Here is what I need, hope someone can help me:
    I want to get a sum of all file sizes in a current directory, based on the file extensions, e.g.
    250K *.txt
    800K *.php
    2M    *.jpg
    10M  *.mp4
    I was trying something with "du -sch" and "type -f" but couldn't get a good result...
    Thanks!

    Still not quite there, but here is what I came up with using bits from here and there:
    #!/bin/bash
    ftypes=$(find . -type f | grep -E ".*\.[a-zA-Z0-9]*$" | sed -e 's/.*\(\.[a-zA-Z0-9]*\)$/\1/' | sort | uniq)
    for ft in $ftypes
    do
    echo -n "$ft "
    find . -name "*${ft}" -exec du -shc {} + | tail -1 | awk '{print $1}'
    done
    The output is:
    .abc 3M
    .bgh 150K
    .cig 100M
    .de 80K
    but I can't the output as it as described in OP...

  • IPhone photo/video library glitch - wrong file extensions, name shift, lost files etc [LONG story - sorry]

    I have a 5s running 7.0.4. and my computer is running Windows 8.1.
    We had a baby and my phone filled up fast with pictures and videos, so I decided to offload them onto my PC. I connected my phone to the usb port, and directly copied from the DCIM folder to my hard drive.
    Something happened during the first attempt, and the process was interrupted. So I went into each of the sub folders, and selected all files, and started the copy process again. I told the computer to skip any existing files.
    So all the file counts matched in each folder, and I figured it was safe to start deleting from my iPhone.
    On my hard drive, I separated all the MOV files into my Videos folder. But in Windows Explorer, the thumbnail view showed several MOV files with no thumbnail - just the generic icon.
    As I sorted my photos into various folders, I also noticed a lot of generic icons instead of thumbnails for the JPGs. I started to feel concerned that my files had become corrupt during the transfer. But then I noticed a PNG file that was a few hundred megabytes. This was odd, so I added the MOV extension to it. Sure enough, it was a video with the wrong extension.
    I renamed every PNG and JPG file that had no thumbnail to add the MOV extension. Every one was a video with the wrong file extension.
    Then I went to the video folder, and all the MOV files that had the generic icon were actually JPG files.
    Well I was just happy to see that the files were not corrupt.
    One more time before I deleted things from my iPhone, I did a spot check to see that the largest videos were on my hard drive. I found a few videos that were not copied over, despite the file counts having been accurate. So I copied the videos again, and compared file sizes and date/times when there was an overwrite prompt. Most were matches, but several were the same file name with different sizes and dates.
    I didn't know what was going on, but I just wanted to get the files on my computer. So I renamed my local copy where there was a name collision, and copied the videos. I deleted the videos from my phone as I went along.
    I felt pretty confident that I had all the files copied now, so I began mass deleting my photos.
    I went to the Photos app on the phone, and watched the thousands of pictures disappear, and the glorious free space grow on my phone.
    But wait... there was still 1 video in the Photos app. I thought I had gotten all the MOV files off the phone...
    I have a photo info app installed, so I was able to see the file name of the video. I searched for that file name in the DCIM subfolders, but the folder that had that series of files (the IMG_3000-3999 files) listed the files with that particular video skipped. It was clearly still on my phone, because I could play it.
    Then I noticed it was a 45 minute long video of my baby. About 5 GB. So I figured it must be due to the file size that it wasn't visible from explorer. (Can't explain why that would be, but M$ keeps changing crap too. I never freaking know what to expect from them either.)
    After having deleted all the jpg, png and mov files from the DCIM folder, there were still about 26 files in my camera roll on the iPhone. And I could still view the video.
    I decided I wasn't concerned about the photos, I just wanted to figure out how to get the video onto my computer.
    So I selected all the photos in the photo app (skipping the 1 remaining video) and tapped the trash can.
    Poof! One item remained, and it was one of the garbage photos. My video is GONE! ^#@*&#($^@Q&%( And no, I didn't fat-finger it. I was very careful to select the correct thumbnails.
    Looking back, I know that I should have just started the entire file copy process from scratch when funny stuff started happening like mismatched file names. But I am a sleep-deprived new mom and just wasn't thinking clearly. It would be nice if I could have used my file/directory compare program to check the iPhone against my laptop, but it is not compatible with devices, only removable drives.
    And no, I don't use iTunes. I stopped using iTunes years ago when it would randomly decide to delete contacts from my phone just because they didn't exist on my computer or some sh-- like that. I have always just manually synced all my stuff and have never had an issue like this. To say I am sad to lose that video is an understatement.
    I googled "iPhone undelete" and "iPhone data recovery" and downloaded a trial for one of the likely candidates. It turned up a bunch of garbage, but not my video.
    Anyways... I am wondering if anyone else has experienced this type of scenario? Has anybody identified what could cause this to happen? I would like to avoid this in the future. (I will avoid this type of loss, because I know now what I could have done differently to be more careful. But it would be nice if I didn't have to get all neurotic about checking 60GB of photos/videos side by side each time I copy them to my computer...)
    I have seen other threads on the forum here regarding corrupted libraries and such, but I am not sure this is the same thing.
    One suspicion I have is that it might have to do with the iPhoto app being installed on the phone. I can't articulate why I think that is worth considering. But when I looked at my Video folder, I ended up with many duplicate videos, and all the duplicated videos' file names were 2 numbers apart. As if all the file names got shifted at some point. Very strange.
    Thanks for listening to my rant. If anybody has an idea, I am interested. If anybody else has lost precious memories due to this, we should talk. If it is a widespread problem, maybe we can all get together and pound down Apple's door?
    As an aside: Why am I unable to select Apple Support Community to post this question to?

    In my case number of weird things happen whenever I try to copy pictures/videos from my iPhone from direct USB...
    1. JPG files are wrongly named as MOV and vice versa.
    2. I copy only folders but in addition files with no extension are copied in the main folder, very strange.
    3. Whenever I open one of the folders, strange icons like this () start appearing which cannot be copied even.
    Unfortunately I used to delete a lot of files with wrong extensions in the past because I never new they could be fixed.
    Apple should answer this!
    Note: I am using Windows 8.1 and use a direct USB cable without iTunes to copy the media files directly from My Computer.

  • How do I make the file extension (ie:  .tif, .jpg, .eps) in OS 9.2 visible?

    I'm trying to transfer files from an old G3 (OS 9.2) to a new G5 (OS 10.5.8). Most files do not show the extension in their name. For example, an Illustrator eps has the file name "layout_final". When I transfer it to the new machine, it recognizes it as an .EXE file and cannot open. If I type in the .eps file extension, where is now reads "layout_final.eps", it then opens in Illustrator. I don't want to have to resort to manually adding in the file extension to every file. Is there a way in OS 9.2 to automatically show/turn on the extension in the file name?
    Thanks for the help!
    Steve

    How are you transferring the files ?
    It sounds like you're going through some sort of Windows / DOS formatted media.
    If you can network the two Macs together instead, do so.
    If you can burn a CD or two on the Mac G3, do so.
    If you have to use a USB stick, format it to Mac HFS Extended (aka HFS+) on either and use that.
    The key is that if you transfer the files using something formatted for Mac, the file metadata should not be lost, and the files will appear on the G5 as expected, assuming that you have suitable apps to open the files in OSX 10.5

  • How to assign file extension and custom icon to executable?

    Hi all,
    I was reading an old thread about this issue:
    http://forums.ni.com/ni/board/message?board.id=170&thread.id=116925 
    I need to try to do this.  My application uses a custom file extension (i.e. .abc).  Upon installation I would like to:
    1.  Assign My App and custom icon to the file class (extension .abc).
    This could be done by manipluting the registry (http://msdn.microsoft.com/en-us/library/bb776856(VS.85).aspx)?  This could be a problem with Vista s unless registry operations occur during installation any changes are placed in a VirtualStore, correct?
    2.  Enable the double-clicking of .abc file type to pass the data in the file to my VI (exe). 
    According to the File Handling Guidelines of Jean-Pierre Drolet (http://www.openg.org/tiki/tiki-index.php?page=File+Handling+Guidelines) the best way to do this may be using LabVIEW as an ActiveX server.
    I know that when I build an executable (or installer?) there is the option to enable LabVIEW to act as an ActiveX server.  This much I know I need to do.
    I thought I would open this discussion again as others may be interested and there doesn't appear to be a completely clear solution available.  Please do contribute where you can.
    Cheers,
    Battler.

    battler. wrote:
    My application consists of Event Structure.
    How to register for ommand line event so that when a user double-clicks on a .abc file I can handle the opening of it?
    This needs to work (the files need to open) not only when the application is closed but also when it's already open.
    Anyone have ideas? 
    The solution to that is to implement a DDE server in your application (and add DDE entries to the registry on installation). There are still DDE functions in LabVIEW vi.lib\Platform\dde.llb but they are considered depreciated and have been removed from the palette, also because Microsoft is trying to tell everyone that DDE is depreciated and sort of unsupported too. But it is still the mechanisme to pass actions from the shell to running applications.
    I hesitate to send you over to lavag.org where there have been some discussions about this years ago. If you go there you would do good to employ a friendly attitude. That board is run all by enthusiasts and idealists and they are all great folks but react not very friendly to people with an attitude.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • I'm having problems uploading video taken with my iPhone 4 to Photobucket.  FB will not accept the file extension which is ex. IMG_423.  They will play on my computer and will upload to Facebook.  Why is the phone taking video with this file instead of so

    I'm having problems uploading video taken with my iPhone 4 to Photobucket.  FB will not accept the file extension which is ex. IMG_423.  They will play on my computer and will upload to Facebook.  Why is the phone taking video with this file instead of something like .mov or mp4.  How can I change the extension after the fact and avoid it in the future?

    You said, "the 4 also has signal and wifi whereas the 5 has only wifi". By "signal", I'm assuing that you mean cellular signal. If so, that means your iPhone 4 is still active on your cellular number and your iPhone 5 is not. Contact your carrier to sort out which phone is active on your account.

  • How do I sort by file type?

    I was wondering how I can sort by file type?  I have a bunch of .moi and .mod files in a directory and want yo delete the .moi files.  If I could sort by type, then it would just be a matter of highlighting those and deleting. I tried sorting by kind, but since they are seen as Unix Executable files by the OS, it sorts them but not by .moi or .mod.  Thanks in advance for your help.
    MAC OS 10.6.8

    I don't believe you can sort by extension.  However, what you can do is to type .moi into the search field at the top of the Finder window where you see those files.  That will initially show all .moi files on your entire computer.  At the top of the displayed search results will the the text "Search:" followed by three choices.  "This Mac" should be selected, but the name of the folder you were looking in will be the second choice...  click that one.  That will cause the search results to contain only files from that folder, containing the text ".moi", which should be the ones you're interested in deleting.

  • Custom sort by file type?

    Hello. I have been using PSE6 for a while but have recently started the trial of Aperture.
    There is a lot to like in Aperture, but I have been unable to get around the problem of sorting my RAW and JPEG files.
    I shoot in RAW+ and have been importing using PSE's importer. That renames the image files and places them on my hard disk. Each image exists as both a .dng and .jpg.
    I have imported a few of these sets of files into Aperture to evaluate it, but can not work out how to do the PSE equivalent of filtering by file type. In PSE I can select a filter to show just the JPEGs or just the RAW. That way I don't have to scan through duplicate versions of every image. Worse still, Aperture doesn't show the file extensions in the filenames that sit under the thumbnails, so both file types for a particular image appear with the same name.
    Can I do the same in Aperture? I saw the 'Custom' option in the sort drop down menu and thought that might do it, but it is greyed out. I can't find anything useful about that option in the manual.
    Reading other posts in this forum I realise that if I had imported from the cards using Aperture I would have only seen the .dng files unless I ctrl-clicked and that would be fine for me. But I have over a year's worth of files already imported with PSE and need a solution to deal with those.
    Thanks!
    P.S. I just worked out that I could type '.dng' into the search box on the film strip and that displays only those files. That gets the result I need, but not as elegantly as having a predefined or custom criterion I can select.

    I too have found that a bit frustrating that there isn't the sort by "kind". I'm used to using Lightroom and/or Adobe Bridge. I like you, have the dng and finished jpg or tiff's next to each other. I have found a work around that works most of the time to sort so it is easy to see which is which.
    Instead of looking at the photos as a thumbnail, look at them in the list view and sort by pixel or file size.
    My dng's are always way larger so they are all listed together. I then can rate the originals. Then I sort them by File Name and the stars from the originals show up.
    Sue

  • Has anyone experienced file extensions not being recognised by the right program?

    I'm using CC -- the whole show, Win 7 Pro and Win 8 Pro on a second PC. Only the Win 7 system is showing this issue but both systems have identical software. Click on an inDesign file and Acrobat tries to open it.
    Click on a Photoshop file and a HDR application called 'Luminance' tries to open it.
    Use the traditional method of choosing the program to open the files with is a waste of time. They still try to be opened by the same apps. I'm no newby here. I know my way around the registry and tried altering that to set the file to program relationship. Next boot and it's as if I'd never altered the registry in the first place.
    This is strictly a work PC, not the sort of thing you'd expect to contract a virus or malware but I installed Microsoft Security Essencials and did a 'Home visit' from a well known AV company. Nothing out of the ordinary on either machine.
    When I bought this system in 2010, I had an issue installing Windows on it. I had to get a MS technician to log on remotely and do the install. (Hour and half so it must have been significant) but since then it has run daily without any issues. Except for a plug-in suite called onOne 5,6 and 7. Whenever I tried to use it with Photoshop, it would open two versions of itself and take out or freeze Photoshop.
    There is only one app in that suite I ever use so part of the refund was providing a stand-alone version of that app. I've pretty much convinced myself that their suite is the cause of the issue with file extensions  but getting anyone to admit they have flakey software is like trying make a horse talk another human language.
    The most recent issue started not long after I installed Luminance HDR, A free app that does a great job of tone mapping. I also use Luminance on the second PC that does not display these any of these problems. It has gotten so bad from trying to install the onOne app as a plugin,(another waste of money, it still kills Photoshop) that I can no longer use file manager to choose a file to open with any Adobe cc program I have. Today I targeted the motherboard and flashed the BIOS, and replaced all the drivers with new versions also.
    Still doing it, GRRRR! I can't believe I'm the only one who has this problem so I'm posting here in the hope I'm not alone and might get a pointer or three on how to fix it. No harm in hoping, is there?
    Ryadia

    Well, well, well... Nothing has changed. Somehow or another Adobe has managed to truly take control of Windows 7.
    I updated Bridge or more correctly... The Cloud did and every files extension in Bridge had 'none' as the application. Lovely stuff. Now All I want to know is why did Adobe take control of Windows file manager and cause this much grief?
    I almost never use the clunky and often impossible to manage Bridge. Simple freeware... Irfanview is way more elegant than Bridge and 10 times more useful IMO.
    Well thanks for the heads up Curt. I never considered the full implication of giving Adobe the freedom to add and remove whatever they wanted to... Forget the don't fix what isnt broken thing... Just pour everything we've got in the cloud onto all the  members PCs, eh? Hard drives are cheap and hey, what are forums for when things go wrong if it isn't to keep Adobe informed of bugs they can silently fix and pour 'em back into the cloud as fixes.
    Ha,ha you just gotta love progress eh?
    This is really going to take on. I can see it now... For every mess up of a PC -- "THE CLOUD DID IT"!!!

  • Search by File Extension

    Is there some way to get Spotlight to search by file extension? Say I wanted to find all Adobe Illustrator files on my computer. The only way I have found to sort of effectively find adobe illustrator files on my computer is to do this:
    kind:image .ai
    It works somewhat, but if any image file contains .ai somewhere in it Spotlight'll show that.
    I've found also that I can do it from the finder by clicking on the + then selecting "kind", then "other", then "Adobe Illustrator Document." This works after taking about 30 minutes to find all adobe illustrator files on my computer. This method is sort of useless to me since it takes quite a few clicks and keyboard inputs to do something that's so simple on other systems. Take windows for example:
    *.ai
    That finds all illustrator files on my PC. Is there something I've missed in spotlight that gives an easy method to search by file extension?
    Powerbook G4 1Ghz   Mac OS X (10.4.4)  

    Probably because you used the default seach goodies which, for reasons best known to the programmers involved, explicitly and invisibly exclude vcards and some mail type file.
    Try this:
    1. Open your hard drive and hit command-f
    2. In the search criterion use the drop down menu to select the "Other..." option
    3. Pick Raw Query
    4. In the Raw Query field type in, or copy and paste, this:
    (kMDItemDisplayName = 'vcf'cd)
    If that doesn't do it you'll have to resort to the free EasyFind software:
    http://www.grunenberg.com/mainmenu.html
    While not as fast, it actually searches everything you tell it to look for.
    Francine
    Schwieder

  • Mac/pc relinking sucks...missing file extension on mac

    hello
    I have indd files with linked images, but this images is from mac, and many mac users dont write file extension to files (). I need to open this files on pc and cant relink this files with "relink to folder" function.
    example: "link1" from mac need to relink on pc to "link1.tif". And here is the end.
    how to beat this problem?????????????
    And please mac users, write extension to files!!!! You are only 5% users in the world. This is general culture!!!

    I was 2/3 fact and 1/3 joke. That's pretty good I'd say!
    I get files without extensions all the time that are impossible without a little knowledge to open. Earlier this week I got this. I made due and found what it was. It's not an amazingly hard thing to do. Bad art preparation doesn't exclusively burn Windows users.
    You don't come to a design forum and cite windows marketshare without expecting some friendly jabs. Mac's Adobe CS3 sales were somewhere around 75% of the total sales, so touting 5% is kind of just asking for flames. It may be shifting more toward PC's, but I've only ever seen one person submit a job to our print shop that used the PC version of InDesign.
    Renaming groups of files to include extensions should be pretty easy for any graphic artist. I've 100 more issues with people having jpegs mislabeled as tiffs than I've had file extensions. Open them in a text editor and figure out what they are. Link management is something any artist should know and it is the obligation of the person inheriting the art to sort it out. If you have issues with what you get provided to you either find someone else to provide the files to you, or if they are a customer that you don't want to lose the business to you are forced to deal with it.
    If it was easy they wouldn't call it work.

  • Problem with reading file extensions from a Fat 32 Drive

    I have been copying image files from my imac 24" OSX 10.6.8 to a Maxxtor One touch external USB drive, the drive is FAT 32 format for a PC. My wife then connects the same drive to her laptop which is running Windows 7. She then sorts the images into different folder gives me back the drive to have more loaded to sort. The problem is when I get the drive back all the image files have a funny little box behind the file extension and the preview icon is blank with a exe in green, the file info says it's a Unix extension.
    I tried to remove the little box and open the .tif file or .jpg files and all I get is a image is not readable. The same drive can be mounted back to my wife's laptop and the images open up just fine in Windows media viewer.
    What's going on here and how do I fix and prevent this from happening again?
    Thanks!
    Pat

    So No one has any ideas on how this is happening and how to go about repairing the problem.
    The trouble as I see it comes up once she moves the files into another folder on Maxxtor drive when it's hooked up to the Win 7 laptoop. The Data then is unuseable on my Mac from that point on.
    I need to know WHY so I can aviod this from happening again, and how to fix currently there is 250 GB of image files I can not access on my Mac and I still have about 2 TB of image files to go through, and THEY ALL NEED TO BE ACCESSABLE.
    Anybody?

  • Search or sort by file type?

    has anybody figured out how to search/sort by file type (.psd, .cr2, Etc.)?
    I've been looking, but I can't find it.

    Bring up the search HUD, use the "+" drop down menu to add an "other metadata" criteria choose file name and type in the extension that you are looking for.
    RB

  • Snow Leopard renaming Nikon '.NEF' file extensions to '.FEF' ?

    Not sure if this is the right forum for this or not -
    Since installing Snow Leopard, all the file extensions for Nikon .NEF are renamed for some reason to .FEF (switches the N to an F) when copying them from my CF card to the Mac - Adobe Lightroom or Photoshop will not recognize or open them. But if I change the file extension to .NEF, it immediately changes the icon to the proper RAW thumb and Lightroom or Photoshop treats it as a normal RAW file.
    Has anyone experienced this before, and do you have a fix? (other than manually renaming hundreds of files)
    This happened immediately upon installing Snow Leopard.

    I have read there are a lot of compatibility issues with Nikon software and Snow Leopard, I think Nikon is working on these.
    What Nikon software are you referring to? You said you just copied them from the CF card to the drive. If you used Nikon Transfer, you had some sort of renaming turned on.

Maybe you are looking for

  • Getting data from list

    hi all.  so i was able to fill my list box from a mysql table.  i know want to get the values that the user select.  heres what i have: [CODE] import fl.controls.List; import fl.data.DataProvider; import fl.events.ListEvent; stop(); var myDataProvide

  • Hard drive absent in disk utility - want to erase and reinstall MacOS

    Hi there. Any help would be most gratefully received. I have a Power Mac G5 Dual 2Ghz with 2GB RAM, one internal HDD (250GB serial ATA 7200rpm - the original one), two external HDDs and a Philips 170B display, running (or not) MacOS 10.39. It was wor

  • Change font size in adobe 11

    i just recently downloaded adobe reader 11 so i could save pdf files. An option for changing font size then popped up so i installed that, however i am still unable to change font size. someone help me please!!

  • Problem with the Letter I

    Sometimes when I view vector art on the screen the letter I shows up extra wide and big, but the printed version works fine. Example below. This only happens some of the time to me, but not always with the same piece of artwork. I think this must be

  • No payload,details in SXMB_MONI

    Hi, I am not able to see any payload in sxmb_moni,I can see the msg processed success and failure ,when I click the flag and go in I do not see any details or payload on the right hand side of the screen,I can only see the msg on the left hand side.W