Web Analytics Made Easy -
StatCounter ASPUpload --> Directory object - CodingForum

Announcement

Collapse
No announcement yet.

ASPUpload --> Directory object

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

  • ASPUpload --> Directory object

    Is there anyway to get the number of files in some directory without looping throughout all the items (files) of the directory?

    Thanks

  • #2
    The sticky thread: http://www.codingforum.net/showthrea...&threadid=8736 might giveyou other ways to do it..
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

    Comment


    • #3
      The thread you gave me doesn't help at all...
      Look at my question please.

      I already built an application, the only problem is I need to know how many files the DIR contains BEFORE I loop, so I can put the items into array WHILE looping (I need to know what size to set the array to).

      Comment


      • #4
        Your "Files" collection has a "Count" property which would be the number of files in the directory.
        Check out the Forum Search. It's the short path to getting great results from this forum.

        Comment


        • #5

          As I said, the application is aspUpload's and not FSO.
          I was wondering if it's possible using this component...
          I didn't find something about it in the reference (www.aspupload.com).

          Anyone knows something about it?

          Thanks

          Comment


          • #6
            So I am guessing you are using the code from that site so why don't you contact the people there?

            http://www.aspupload.com/support.html
            Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

            Comment


            • #7
              I think you can't find the number of files in a folder using AspUpload as I've seen in this reference or in this. So FSO is your choice.
              Glenn
              vBulletin Mods That Rock!

              Comment


              • #8
                No one ever died trying

                Thank you all.
                I was just trying this:
                Code:
                Upload.Directory( "C:\*.*", SORTBY_NAME)[B].count[/B]
                and it worked!

                Comment


                • #9
                  For a moment, I thought to ask you to try it when I posted that reply but I didn't.
                  But I'm glad you discovered it yourself.
                  Glenn
                  vBulletin Mods That Rock!

                  Comment


                  • #10
                    Um... did I ever mention I hate internet explorer?

                    It's still very buggy. Sorry to be off-topic but I was going to say something cool about Glenn's post, and I couldn't even edit my own thanks to IE deleting text in a textarea instead of inserting additional text in its place.

                    I'm going to have to uninstall IE I guess. (And yeah... you can from what I hear, haven't tried it yet!)
                    Former ASP Forum Moderator - I'm back!

                    If you can teach yourself how to learn, you can learn anything. ;)

                    Comment

                    Working...
                    X