Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Feb 2008
    Posts
    116
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Possibly need help with vbscript

    I possibly need help with vbscript. I need to somehow evenly distribute files from a FolderA to four other seperate folders. can you help me?

  • #2
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    You can use the FileSystemObject to get a list of all the files in folder A.

    Then use a for loop to iterate through the list. Then use do: <your for loop variable> mod 4 to determine which folder to place it in and move the file. That should evenly distribute the files.
    OracleGuy

  • #3
    Regular Coder
    Join Date
    Feb 2008
    Posts
    116
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Thanks

    Thanks for your reply.

    If I was more code-knowledgable I'd have a better understanding of your solution. It sounds like a great solution.

    I don't know why I would need to "get a list". I would just like to evenly distribute the files that get uploaded into FolderA, to destination folders.

    If you're interested in providing an example, or more details, I'd be interested in learning more about this solution.

    Thanks.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •