Announcement

Collapse
No announcement yet.

Desktop folder showing only wildcard files

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Desktop folder showing only wildcard files

    Does anyone know how to create a desktop folder that only shows specified wildcarded files?

    Best Regards

    Jim


    ------------------
    Jim Seekamp
    Jim Seekamp

  • #2
    Delete all the non-matching files from the folder?

    Seriously, you can create a folder using the MKDIR statement, but first you have to identify the correct parent folder. Search the Source Code forum for "shGetSpecialFolderLocation" and you should find some code.

    Displaying only the files matching a given wildcard is much harder... that is a function of the software used to view the folder, and controlling that is much more difficult if the folder contains other types of files.

    If you are only interested in displaying them from within your own code, then you could use the common dialog OpenFileDialog() to do the hard work, giving it a wildcard mask. Alternatively, you could write your own with DDT.

    Maybe you can be more specific about what you want to achieve...



    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    Lance
    mailto:[email protected]

    Comment


    • #3
      Of course, to delete is the best solution, but setting "hidden" attribute also helps (at least, sometimes).


      ------------------
      E-MAIL: [email protected]

      Comment


      • #4
        "sometimes" is a correct observation - the visibility of hidden files can easily be changed in Explorer's Options settings, so it is absolutely not a bullet-proof solution.

        We still need to know more about what Jim really wants to do here.


        ------------------
        Lance
        PowerBASIC Support
        mailto:[email protected][email protected]</A>
        Lance
        mailto:[email protected]

        Comment


        • #5
          Thanks for the responses, but what I'm looking for is a way in Windows itself that a non-programming friend of mine can create a folder on his desktop with only wildcard-specified files showing in it.

          - Jim


          ------------------
          Jim Seekamp
          Jim Seekamp

          Comment


          • #6
            Then I'd suggest writing an application that emulates the look of a folder on the desktop, and presents an Explorer look-alike interface with the customized functionality. You could also make it drag and drop aware so it could function like a folder.

            A fair bit of work, but it is possible.

            Good luck!


            ------------------
            Lance
            PowerBASIC Support
            mailto:[email protected][email protected]</A>
            Lance
            mailto:[email protected]

            Comment

            Working...
            X