Filetype

My problem is, I use my phone for inspections and taking pictures at my workshop. I need to take several picures at a time and have to send them by email on my work place PC. Unfortunatly the standard file type for pictures makes a picture so big, that I only can send max. 5 pictures at a time.
In comparism to my Lumia 930, which I also use, the filetyp produces much smaller files and I have no limit of pictures that can be send by email...
Andy ideas?

Hi Cooltechie1234,
According to your description, my understanding is that you want to check file type for document library.
In SharePoint designer, you can get file type like below:
Best Regards,
Zhengyu Guo
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Zhengyu Guo
TechNet Community Support

Similar Messages

  • In gui_download FM can we input  FILETYPE = 'WK1'

    In gui_download FM can we use the filetype = 'wk1'. or it is going to support only BIN and ASC.
    i want to upgraded ws_download to gui_download.in that ws_download filetype was 'WK1' .so how to give WK1 IN GUI_DOWNLOAD.
    PLS ITS URGENT

    you can use WK1 also
    chk this help
    'ASC' :
    ASCII format. The table is transferred as text. The conversion exits are carried out. The output format additionally depends on the parameters CODEPAGE, TRUNC_TRAILING_BLANKS, and TRUNC_TRAILING_BLANKS_EOL.
    'IBM' :
    ASCII format with IBM codepage conversion (DOS). This format corresponds to the 'ASC' format when using target codepage 1103. This codepage is often used for data exchange by disc.
    'DAT' :
    Column-by-column transfer. With this format, the data is transferred as with ASC text. However, no conversion exists are carried out and the columns are separated by tab characters. This format creates files that can be uploaded again with gui_upload or ws_upload.
    'DBF' :
    The data is downloaded in dBase format. Because in this format the file types of the individual columns are included, import problems, for example, into Microsoft Excel can be avoided, especially when interpreting numeric values.
    'WK1' :
    The data is downloaded in Lotus 1-2-3 format.
    'BIN' :
    Binary format. The data is transferred in binary format. There is no formatting and no codepage conversion. The data is interpreted row by row and not formatted in columns. Specify the length of the data in parameter BIN_FILESIZE. The table should consist of a column of type X, because especially in Unicode systems the conversion of structured data into binary data leads to errors.

  • I set firefox to open a filetype (.SGF) w/ a program but it doesn't, so I set it to save/ask and neither option works, it always opens file link in a new tab.

    I've gone into the Options and set the .SGF file to open with Smartgo. It refuses to do that. Clicking on a link to a .SGF file simply opens the file as text in a new tab.
    Since this didn't work, I tried to set firefox to download it instead, because then I can use the window's filetype associations to open it. It won't download the file unless I actually right-click and save-as on the link.
    This is tedious when viewing lots of these files. I even set it to Ask me after I saw the the Download option didn't work. It doesn't Ask me. What is going on here?
    Also I am using firefox 23
    EDIT: It seems to be website specific. Some websites will allow me the option to open it in Smartgo, others will just open it in a tab as text. What is causing this discrepancy and can it be surmounted through browser settings?
    An example website to showcase the issue is:
    http://igokisen.web.fc2.com/wr/lg.html
    clicking on any of these links will not download, open, or ask about what you want to do with the file.

    That happens if the server sends the file as text/plain.
    You can see this if you open "Tools > Page Info > General": Content-Type: text/plain
    Files send this way will always open in a tab.
    *https://developer.mozilla.org/Tools/Web_Console

  • Save for Web filetype default in PSE 8 on Windows 7

    I just installed PSE 8 on a new Windows 7 system. On my earlier Windows XP system running PSE 6, the Save for Web filetype defaulted to JPEG Medium, which is what I wanted. On this installation, it defaults every time to GIF; I change it and save the file as a JPEG, and the next one defaults again to GIF. Closing PSE, rebooting Windows, nothing changes that. I would like to make the default JPEG Medium; is there a way?

    On a MAC it does seem to stick on the last option you saved e.g. Jpeg if it was a Jpeg image.
    For windows, this seems to work:
    Find the file PhotoshopElementsEditor.exe using explorer (in the C:\Program Files\Adobe\Photoshop Elements 8.0 folder) right click on that file and choose Run As Administrator.
    Go back to the editor, open an image, select Save for Web and choose jpeg; then save that file. The next time you run the editor and use the save for web command the jpeg type should hopefully stick as the default.

  • How To Get FileType and MIME Type from a File

    Hi,
    I am using following ways to get FileType and MIME Type.
    I am able to get file type, but I am getting MIME Type as */*
    Can any one please let me know how to get MIME Type, but it should not be time consuming process.
    For File Type I am using following Code:
    private String getFileData(InputStream inStream) {
    fileName = C:\temp\temp.tiff
    String filePath = Util.createTempFile(fileName);
    RandomAccessFile raf = new RandomAccessFile(filePath, "rw");
    while (inStream.available() > 0) {
         byte[] buf = new byte[inStream.available()];
         inStream.read(buf);
         raf.write(buf);
    inStream.close();
    raf.close();
    File file = new File(filePath);
    JFileChooser chooser = new JFileChooser();
    String fileType = chooser.getTypeDescription(file);
    file.delete();
    //MIME Type I am getting from
    DataHandler data = new DataHandler(new DocumentSource(inStream));
    data.getContentType();
    data.getContentType() is not working well in all cases.
    Can any one help me on this.
    Thanks in advance,
    Ram.
    Edited by: javausers07 on Apr 15, 2009 4:25 PM

    javausers07 wrote:
    Hi,
    I am using following ways to get FileType and MIME Type.
    I am able to get file type, but I am getting MIME Type as */*
    Can any one please let me know how to get MIME Type, but it should not be time consuming process.
    For File Type I am using following Code:
    private String getFileData(InputStream inStream) {
    fileName = C:\temp\temp.tiff
    String filePath = Util.createTempFile(fileName);
    RandomAccessFile raf = new RandomAccessFile(filePath, "rw");
    while (inStream.available() > 0) {
         byte[] buf = new byte[inStream.available()];
         inStream.read(buf);
         raf.write(buf);
    inStream.close();
    raf.close();
    File file = new File(filePath);Why do you do all above?
    JFileChooser chooser = new JFileChooser();
    String fileType = chooser.getTypeDescription(file);
    file.delete();
    //MIME Type I am getting from
    DataHandler data = new DataHandler(new DocumentSource(inStream));
    data.getContentType();
    data.getContentType() is not working well in all cases.That's because there's no way to get MIME type of all files on all filesystems.
    Kaj

  • Can't change filetype association back to CS5

    [FYI - similar post in the Acrobat and InDesign forums.]
    We  installed the CS5.5 upgrade  today, and for the time being I would  prefer to open my existing Illustrator docs with CS5.0, using 5.1 only when  we receive v5.1 files.
    I  highlight an AI file, Get  Info, change Open With to Illustrator CS5 and click  Change All. As soon as  I'm done the dropdown switches back to Illustrator CS5.1 (!!!), and  nothing is actually changed in terms of what app OS X is using to open Illustrator files.
    Am I missing something? Is  CS5.1  overriding the system perhaps? (An older version of Freehand used to do  this, which was super-annoying until they came out with a  patch to fix  that and about seven hundred other things.) I'm really not sure if this  is  an Adobe issue or an OS X issue, but I've never had trouble  changing  filetype associations in the past.
    TIA for any tips!
    OS X 10.6
    Macbook Pro
    PS. It's annoying enough that CS5.1 *still* can't find Pantone 485 in the Swatch Book pallete (it finds 1485 instead)... this bug has only been around for five or six versions now, I guess maybe 20 or years down the line they'll finally get around to fixing it???

    Actually, I think this is a generic Mac OS X bug...I've seen it with other applications sometimes, never took the time to really track it down. You can probably open the CS5 package bundle and edit Content/Info.plist in the Property List Editor and remove its association with IDd7 files. I suppose you might have to run some horrible lsregister invokation after that to make it "take" but I think it should pretty much work.

  • Is there a way to change the default export filetype in Illustrator CS4 for Mac OSx

    Hi,
    I do a significant amount of exporting from Illustrator and always need my images exported as JPG. The default filetype for exporting in CS4 (for mac) is PNG, and I can't find a way to change this. Since I always want to export as JPG, I feel like I should be able to set that as a default.
    Am I missing something? How can I change this default?
    Thanks,
    Chris

    You can create an action.
    Record the action then go to file export select jpeg and then the quality etc and then exort and stop recording the action give it a keyboard shortcut.

  • In WS_DOWNLOAD   , FILETYPE                      = 'WK1'

    Hi pals,
            I am using WS_DOWNLOAD function module in 4.6c, with file type = 'WK1'. i am getting EXCEL(.XLS File) results with out lines(similar to EXCEL SHEET). I need to get excel format(boxes)by using same file type (WK1)
    Can any body suggest me.
    Thanks in advance.
    Balaji.

    Ok, if you still need a solution. for this.  This will work.   This program uses the WS_DOWNLOAD function  module(as you were) and then uses OLE to open the excel and put the grid lines in.  The data is stored on the PC in a temp file, then is save to the real file name after adding the grid lines.  The temp file is then deleted from the frontend.
    report zrich_0002.
    data: it001 type table of t001.
    include ole2incl.
    data: e_sheet type ole2_object.
    data: e_appl  type ole2_object.
    data: e_work  type ole2_object.
    data: e_cell  type ole2_object.
    data: e_borders  type ole2_object.
    data: tmp_file type localfile value 'C:tmpfile.xls'.
    parameters: p_file type localfile default 'C:Test.xls'.
    start-of-selection.
      select * into table it001
              from t001.
      call function 'WS_DOWNLOAD'
           exporting
                filename = tmp_file
                filetype = 'WK1'
           tables
                data_tab = it001.
    * Start the application
      create object e_appl 'EXCEL.APPLICATION'.
      set property of e_appl 'VISIBLE' = 0.
    * Open the file
      call method of e_appl 'WORKBOOKS' = e_work.
      call method of e_work 'OPEN'
              exporting
                   #1 = tmp_file.
      get property of e_appl 'Cells' = e_cell.
      call method of e_cell 'Select'.
    *left
      call method of e_cell 'BORDERS' = e_borders exporting #1 = '1'.
      set property of e_borders 'LineStyle' = '1'.
      set property of e_borders 'WEIGHT' = '2'.                 "4=max
      free object e_borders.
    * right
      call method of e_cell 'BORDERS' = e_borders exporting #1 = '2'.
      set property of e_borders 'LineStyle' = '2'.
      set property of e_borders 'WEIGHT' = '2'.
      free object e_borders.
    * top
      call method of e_cell 'BORDERS' = e_borders exporting #1 = '3'.
      set property of e_borders 'LineStyle' = '3'.
      set property of e_borders 'WEIGHT' = '2'.
      free object e_borders.
    * bottom
      call method of e_cell 'BORDERS' = e_borders exporting #1 = '4'.
      set property of e_borders 'LineStyle' = '4'.
      set property of e_borders 'WEIGHT' = '2'.
    ** Close the file
      get property of e_appl 'ActiveWorkbook' = e_work.
      call method of e_work 'SAVEAS'
            exporting
                #1 = p_file
                #2 = 1.          " Don't ask me when closing
      call method of e_work 'close'.
    * Quit the file
      call method of  e_appl  'QUIT'.
    * Free them up
      free object e_borders.
      free object e_cell.
      free object e_work.
      free object e_appl.
    * Remove the tmp file from frontend
      call function 'WS_FILE_DELETE'
           exporting
                file = tmp_file.
    Please remember to award points for helpful answers and mark you post as solved when your problem is solved completely.  Thanks.
    Regards,
    RIch Heilman

  • GUI_DOWNLOAD  "BIN"  filetype in Browser not working

    Hi ,
    I am downloading an internal table with XML data using GUI_DOWNLOAD  and FILETYPE as BIN.
    This is not working in the SRM browser
    Please let me know if anyone has any idea on this
    Thanks
    Sekhar J

    Just make your default browser working.
    Goto configuration in settings and select correct settings for default config. Settings and preferred access point and select default in all apps and select yes.
    Now your default browser should be working for downloads.
    -------------------If this post helped you, click on accept as solution.------------------
    -----------------------------Appreciate by clicking on white star.----------------------------

  • How to use gui_download 's  filetype of 'bin'

    Hello,experts ,the detail of my problem as follows:
    I use gui_download to download the invoice data :filetype is ASC,the download file is .txt file with tab as the field 's separator.
    the internal table:i_khzl :DATA: BEGIN OF i_khzl OCCURS 0,        "ITAB OF HEAD INFO.
            fpdm(15),                      "invoice no
            tdh(15),
            khswdjh(15),                   "
            khmc type TEXT100,
           " khmc(100),                     "customer
            khdz(100),                     "
            khyh(100),                     
            bz(100),                       "
            qdhj(1),
            jmhj(1),
            fphm(18),                 
          END OF i_khzl.
    but there is not  a Chinese characters like"燊" in the codepage 8400, which result in the customer name display as wrong ,the last byte is '?', and the I download the data using filetype of BIN ,the ? of customer name is gone,but the local file  .txt the format is wrong, which the interface of the invocie system can not confirmed.
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = g_fname
          filetype                = 'ASC'
          write_field_separator   = 'X'
          trunc_trailing_blanks   = 'X'
          "codepage                = '4102'
        TABLES
          data_tab                = i_khzl
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          OTHERS                  = 22.
      IF sy-subrc <> 0.
        MESSAGE e003 WITH g_fname.      "下载文件错误
      ENDIF.
    the bin download:
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = g_fname
          filetype                = 'BIN'
        TABLES
          data_tab                = i_khzl
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          OTHERS                  = 22.
      IF sy-subrc <> 0.
        MESSAGE e003 WITH g_fname.      "下载文件错误
      ENDIF.
    THE CONTENT OF THE LOCAL TXT IS :
    ASC:
    0491052960          451281672481214     宜州市燊龙贸易有限责任公?                                         
    BIN:0491052960                    451281672481214宜州市燊龙贸易有限责任公司                                                                         
    the format of the two txt content is different, how to change the bin 's type to asc' type ?or how to use the gui_download function to solve the wrong display of the customer name?
    pls help me ,
    much appreciated.

    Dear Pradeep,
    Find the below link which explains a simple data download to excel from a table view.
    www.sapt echnical.com/Tutorials/BSP/Excel/Index.htm
    Try to avoid the way your using in the BSP application and it is abdicable to use the standard methods / class available like "cl_bsp_utility"
    Hope this will be helpful.
    Regards,
    Gokul.N
    Edited by: Gokul on Oct 8, 2009 9:57 AM

  • Firefox tries to open a certain filetype (.spk) as text and never adds an entry to the Applications tab in Options, so I have no way to change this behavior.

    Since it's not in the Applications tab, I can't change how Firefox handles it. And since it automatically opens it as a text file, I have no way to download this filetype when it's linked to with javascript or flash because I can't right-click and "Save Link As."
    How can I make Firefox ask me how to handle the file instead of treating it as text?
    I've already tried deleting "mimeTypes.rdf" from my Firefox profile.

    Then how do I manually tell Firefox to save text files instead of automatically displaying them?
    There's no "text/plain" type for me to edit listed on the Applications tab.
    Screenshot attached showing the page info for one of the spk files and the Applications tab with no "text" type listed.
    There's another at [http://www.tecsg.co.uk/scs/scs407.spk here]. I don't care if the web server owner has attached the wrong MIME type to a file so long as Firefox will give me a chance to tell it how I want it to be handled. If it's not a webpage (html, php, etc.) then Firefox should not try to render it by itself without asking. --- On a side note, how do I get this forum to treat my line returns like line returns rather than spaces?

  • Why can't you change the .html/.htm filetype icons for Firefox?

    **Before you read this question: NOTICE I am talking about Firefox Icons on Windows, NOT ON FIREFOX BOOKMARKS/PROGRAM!!!!! Read the question then please, please visit the link so you have a better understanding of what I'm asking with this question!!!!**
    I've been trying to change the FileType Icons for the Firefox Documents for weeks now and there's no solution that I can see. I tried using Filetypes Manager to change the .html/.htm filetypes icons with no luck. Why does Firefox force this change on users when most users that use Firefox do so because of it's ability to be customizable? Even Microsoft Word .doc file icons allow you to change them! Microsoft!!! Why is Firefox forcing everyone to use their ugly filetype icons? &____& I've yet to see this issue not only addressed but solved. Why does Firefox ignore this issue? I'd like my computer's icons to all be top-notch, and Firefox is preventing me from making my weeks of hard work go to naught. Please, please address this issue... if anything, tell your users why your program is forcing the icons on them in the first place when monopolies like Microsoft allow their users to customize program filetype icons.
    If this cannot have a fix, why can't it be a new feature/addition to the newest versions of Firefox?
    Edit: And because people are starting to get 'confused' I've included a screen shot of what I'm talking about because, for the love of god, people, I'm *not* talking about using favicons and bookmarks!
    http://i28.photobucket.com/albums/c231/arcanetheorem/example.png

    The only thing I changed about the question was to add an image and to try and make it more understandable since everyone assumed I was talking about Favicons/Bookmark Icons....
    As for it being a Windows 7 issue and not a Firefox one... if it were just a Windows 7 issue I wouldn't be able to change other application icons or filetype icons on the Windows platform using FileTypes Manager. Firefox, from what I've been able to gather, is not one that can be changed. If I change the filetype icons for Word Documents any other extension (like .mp3/.mp4/.avi/.mkv), I get the changed icon I wanted. However, when you try to change the Firefox .html/.htm filetype extension icons, it doesn't work. Have you tried going through changing your icon filetypes using FileTypes Manager to see this issue? If it were a Windows or FileType Manager issue, then I'd have trouble changing other icons on that platform, no? So what I'm asking with my question is why this is. Why, if you use FileTypes Manager to change Windows7 icons, is Firefox's icons the only ones that won't be changed? Doesn't this fall under Firefox's problem if their icons are under the 'can't be changed' category under Windows? And using shortcut icons is no good for me. When I browse a folder of .html files, I want to see the icons I changed it to, not make a shortcut to every .html file I have just to have a better-looking Visual Style. Defeats the purpose, doesn't it? As for clicking on Properties to change it... Windows 7 doesn't allow this feature anymore, which is why I've been using FileType Manager to change all filetype extension icons.
    Hope that helps clear things up a bit, though I have a feeling I'm just confusing everyone more with what is a simple question/problem....

  • Adding support for another Filetype in Acrobat 9.0 Pro Extended

    Hi,
    we're using Acrobat 9.0 Pro Extended and have the problem that it is not supporting an filetype which we want to use.
    Its a bit strange because it is supporting Solid Edge 3D model files (*.par, *.pwd, *.psm, *.asm) but noth the 2D filetype *.dft we want to use.
    Is there any possibility to add support for that?
    Be happy for any help.
    Greetings
    Steffen Eppler

    If it's not supported then it's not supported. You can either convert it to a format that is supported, or make a feature request here:
    http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • Can't change filetype association back to Acrobat 9

    We installed the CS5.5 upgrade today, and right off the bat I don't really care for Acrobat X. This is not the time or place to go into it all, so please don't respond only to ask me why I feel this way... for the time being I'd like to set my PDFs to default to Acrobat 9, only using 10 when I have to.
    I highlight a PDF, Get Info, change Open With to Acrobat 9.4.4 and click Change All. However, that doesn't actually change anything, all my PDFs continue to open in Acrobat X.
    Am I missing something? Is Acrobat X overriding the system perhaps? (An older version of Freehand used to do this, which was super-annoying until they came out with a patch to fix that and about seven hundred other things.) I see that InDesign CS5.5 is doing the same thing, I'm really not sure if this is an Adobe issue or an OS X issue, but I've never had trouble changing filetype associations in the past.
    TIA for any tips!
    OS X 10.6
    Macbook Pro

    ~graffiti wrote:
    PjonesCET wrote:
    if you just select one file it sets asssocation for that one file.
    Not neccesarily true. It WILL however only set the association for that particular type of PDF (say one's that were created by a certain application).
    PjonesCET wrote:
    To properly set  for all files you select 5 or more PDF's  make suere some of them are PDF created by Preview
    And if they were all created by the same application (say Apple Quartz for instance) you're back in the same boat.
    The trick is to select a few PDF's (Absolutely no reason that it has to be 5, that's Phillips thing) created by different applications or at least be sure it's one from the application you use.
    I've found less than five don't give an accurate sampling. That's the reason for 5 or more created by different  Applications.

  • Filetype HTML.xht workaround for Dreamweaver CS5.5

    upon upgrading to Dreamweaver CS5.5, i noticed that files of filetype HTML.xht in one of my web projects either wouldn't open in Dw, or wouldn't open with link color cueing and file management.
    the known workaround is configuring the following files by adding item 'XHT' after 'XHTML' on the line for 'HTML' documents:
         Applications/Adobe Dreamweaver CS5.5/Configuration/DocumentTypes/MMDocumentTypes.xml
              [in Dw CS5, was Applications/Adobe Dreamweaver CS5/Configuration/DocumentTypes/MMDocumentTypes.xml ]
    and
         /Users/me/Library/Application Support/Adobe/Dreamweaver CS5.5/en_US/Configuration/Extensions.txt
            [in Dw CS5, was /Users/me/Library/Application\ Support/Adobe/Dreamweaver\ CS5/en_US/Configuration/Extensions.txt ]
    the workaround enables Dw CS5.5 to open an HTML5 document with an 'xht' extension via the Files Panel.
    additional information about 'deployment of HTML.xht' is noted on my web site at
    http://www.enhanceability.com/dev/0.xht
    please let the Dreamweaver developers know that there must be a better way to support HTML.xht or HTML5.
    best regards,
    Ron Stone

    Hi Peran,
    I actually resolved the problem by accessing the website with Internet Explorer (ver. 8.0.7601.17514)) rather than with Chrome (ver. 35.0.1916.153 m).  Link =  http://helpx.adobe.com/creative-suite/kb/cs5-5-product-downloads.html, which can be navigated to via your link (http://helpx.adobe.com/download-install.html) as well as via the link referenced in my question  (https://www.adobe.com/downloads/other-downloads.html).  The problem apparently related to Chrome.
    Thank you,
    Larry

  • Sorting an array of filenames by filetype?

    I have an array of filenames read from a directory list. I
    can parse the
    file type from each filename using a function. How would I
    then sort the
    array by their respective file type, so that all PDF files
    sort together in
    the array, for example? Or would it be easier to just loop
    through the
    array by filetype, printing each matching array value?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================

    That's exactly the code I am using except without the
    multisort. It should
    be an easy retrofit!
    Thanks, Joe!
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Joe Makowiec" <[email protected]> wrote in
    message
    news:[email protected]...
    > On 14 Apr 2008 in macromedia.dreamweaver.appdev, Joe
    Makowiec wrote:
    >
    >> On 14 Apr 2008 in macromedia.dreamweaver.appdev,
    Murray *ACE* wrote:
    >>
    >>> I have an array of filenames read from a
    directory list. I can
    >>> parse the file type from each filename using a
    function. How would
    >>> I then sort the array by their respective file
    type, so that all
    >>> PDF files sort together in the array, for
    example? Or would it be
    >>> easier to just loop through the array by
    filetype, printing each
    >>> matching array value?
    >>
    >>
    http://www.php.net/manual/en/ref.array.php
    >>
    >> There are a bunch of sorting functions there.
    array_multisort and
    >> uasort both look interesting. Got code?
    >
    > Dropin for a directory listing in a <ul>:
    >
    > <pre>
    > <?php
    > $files2 = array();
    > if ($handle = opendir('.')) {
    > echo "Input: .\n";
    > echo "Directory handle: $handle\n";
    > /* This is the correct way to loop over the directory.
    > while (false !== ($file = readdir($handle))) {
    > $files[] = $file;
    > if (substr($file, 0, 1) != '.') {
    > $separator = split('\.', $file);
    > $files2[] = array('filename' => $separator[0], 'ext'
    =>
    > $separator[1]);
    > }
    > echo "$file\n";
    > }
    > closedir($handle);
    >
    > // print_r($files);
    > // print_r($files2);
    >
    > foreach ($files2 as $key => $row) {
    > $filename[$key] = $row['filename'];
    > $ext[$key] = $row['ext'];
    > }
    >
    > array_multisort($ext, SORT_ASC, $filename, SORT_DESC,
    $files2);
    >
    > // print_r($files2);
    >
    > reset($files2);
    >
    > }
    > ?>
    > </pre>
    > <ul>
    > <?php
    > foreach ($files2 as $myfile) {
    > echo "\t<li>";
    > echo $myfile['filename'];
    > echo (empty($myfile['ext'])) ? '' : '.' .
    $myfile['ext'];
    > echo "</li>\n";
    > }
    > ?>
    > </ul>
    >
    > Code's probably uglier than it needs to be, but it
    works.
    >
    > --
    > Joe Makowiec
    >
    http://makowiec.net/
    > Email:
    http://makowiec.net/contact.php

Maybe you are looking for