+ Reply to Thread
Results 1 to 4 of 4

Moving files folder to folder using macro.

  1. #1
    Registered User
    Join Date
    10-05-2008
    Location
    Louisiana
    MS-Off Ver
    2007
    Posts
    17

    Moving files folder to folder using macro.

    sounds simple at first but it gets more complex, at least for me. This is what I am looking to do.

    Have a folder on my desktop named "DropBox". In that folder (or elsewhere if needed) would reside the file with the required Macro.

    Through out the day I would be dropping files of varring files types into the "DropBox". The file names would all be of format "abcdef-####.ext" i.e. contract-1204.pdf or Picture23-1205.jpg

    In another directory I have a Long list of job folders. These folders are all named using four digit numbers. i.e. 1204, 1205, etc

    at the end of the day I would like to be able to open the file with the needed macro, click a button and have it move all files out of the "DropBox" and into their respective job folders, regardless of file name or extension. i.e. contract-1204.pdf would be moved to job folder 1204 and Picture23-1205 would be moved to job folder 1205

    Other info: the list of common used extensions is short. If there were multiple loops in the macro to handle each, (lets say .jpg .docx .xlsx .pdf) it would be fine if other files were left behind and needed to be moved maually, as other file types would be used rarely. Of course if the macro was blind to file extensions and just moved any file extension would be even better.

    I would be the one nameing all these files. The name format above is my chosen one, however if I need to move the job number to the front or something (1204-contract.pdf rather than contract-1204.pdf) that would be acceptable

    Thanks in advance. I am looking forward to working on, and with this project.
    Last edited by azureriders; 10-23-2011 at 09:03 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Moving files folder to folder using macro.

    This does not have any error checking in it, so those folders need to exist as you've indicated.

    Please Login or Register  to view this content.
    Place the file with this macro into the DropBox folder and it should work fine.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    10-05-2008
    Location
    Louisiana
    MS-Off Ver
    2007
    Posts
    17

    Re: Moving files folder to folder using macro.

    Excellent. Sorry I have not had the chance to monitor this closer. Have been in quartly staff meetings for two days. This works perfectly. Now I just need to get it to the office and make sure it is going to work across the network. I dont forsee a problem there.

    Thanks again

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Moving files folder to folder using macro.

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ 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