+ Reply to Thread
Results 1 to 6 of 6

Copy multiple files from folders

  1. #1
    Registered User
    Join Date
    01-25-2009
    Location
    Florida, USA
    MS-Off Ver
    Excel 2003
    Posts
    78

    Copy multiple files from folders

    Hello,

    I found this great code which copies files to another folder:.. found here: http://www.rondebruin.nl/folder.htm


    Please Login or Register  to view this content.
    Is it possible to modify this somewhat?

    The files i'd like to copy are part of an animation sequence. (1000 frames long)

    ie:
    Image_0000.jpg
    Image_0002.jpg
    Image_0003.jpg
    Image_0004.jpg
    etc..

    What I'd like to do is add a line which designates a numerical value amount to copy. (every 40 frames)

    ie:
    to copy files 0 - 40 to C:\Folder1
    files 41 - 80 to C:\Folder2
    files 81 - 120 to C:\Folder3
    etc.


    Is this possible?

    Thanks for any help.

    Jeff
    Last edited by Leith Ross; 07-29-2009 at 01:17 PM.

  2. #2
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    Re: Copy multiple files from folders

    Hi
    Create folders 1 to 25 in C drive and try the macro in the attached file
    Ravi
    Attached Files Attached Files

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Copy multiple files from folders

    Hello Jeff,

    Do you only need the first level of sub folders (those in the parent folder), or do you need to search through thel sub folders of the sub folders, etc?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Registered User
    Join Date
    01-25-2009
    Location
    Florida, USA
    MS-Off Ver
    Excel 2003
    Posts
    78

    Re: Copy multiple files from folders

    Thanks Ravishankar.

    However, I'm uncertain how your code works?

    When i run the script it seems to grab the names of all .jpg from my desktop and copy this into column A:
    Looking at the code, it's unclear where the directories are located.

    ---

    What i'd like to do is take a large sequence (say 1000 frames.. Anim_0000.jpg) from C:\Anim\Sequences\Render1

    and divide this (say ever 40 frames) into their own folders, located on: C:\Anim\Sequences\Finals\

    ie:
    C:\Anim\Sequences\Finals\Folder1
    C:\Anim\Sequences\Finals\Folder2
    C:\Anim\Sequences\Finals\Folder3
    C:\Anim\Sequences\Finals\Folder4
    C:\Anim\Sequences\Finals\Folder5
    etc

    The length of the original animation may not always be 1000 frames, and the division amount may not always be 40 images per folder.. Both these variables may vary.

    The initial code i posted was great in that it allowed me to assign my own "FromPath" and "ToPath" directories.. and it also was not sequence length specific..
    It copied any (all) amount of files to a destination folder.

    hope this helps

    Thanks for the response!

    Jeff

  5. #5
    Registered User
    Join Date
    01-25-2009
    Location
    Florida, USA
    MS-Off Ver
    Excel 2003
    Posts
    78

    Re: Copy multiple files from folders

    Thanks, Leith

    I've attempted to be more specific in my response to Ravishankar. I've indicated my directory/subfolders there.

    sorry about any confusion.

    thanks

    Jeff

  6. #6
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    Re: Copy multiple files from folders

    Hi
    try the modified macro from attached file. It has source and dest as variables. split is still at 40 per folder. If you tell me how I should decide what the split is, I will modify the code suitably.
    In my earlier macro: filepath was where the file was located. In your case - Desktop. Look at cells A1 & B1. They defined the path for the macro. It lists all .jpeg files in that directory (not restricted to 1000) and copies all files in splits of 40.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1