+ Reply to Thread
Results 1 to 3 of 3

Move Files to Master Folder Based on the Contract no e.g T1782, T98882

  1. #1
    Registered User
    Join Date
    03-09-2021
    Location
    London
    MS-Off Ver
    2016
    Posts
    16

    Move Files to Master Folder Based on the Contract no e.g T1782, T98882

    Hi All. Any kind of help would be really appreciated. I have below VBA project which moves files from one folder to Master folder based on the specific identification number which is "T" and then numbers. For example. T98 Contract, T12984 Contract, T 92 Lease. below is the sample of file names,

    T1525 FULLY SIGNED LEASE_9263pdf
    T1525_FULLY SIGNED LEASE_9263pdf
    T 1525 TEMP RENEWAL_8233pdf
    eT920_Principal Lease Agreement_10542pdf
    eT920_RENEWAL AGREEMENT_452TIF


    The current code moves the file based on initial 13 character however i want to change it to move the files based on the contract number starting from T.

    I think i need to only change the StrDestFolder Code. I tried to change the line to below but its not working.

    Please Login or Register  to view this content.


    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by alansidman; 04-18-2022 at 05:14 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,860

    Re: Move Files to Master Folder Based on the Contract no e.g T1782, T98882

    Code Tags Added
    Your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Question Re: Move Files to Master Folder Based on the Contract no e.g T1782, T98882


    Hi,

    unclear …

    Is it only for pdf files ? Should be easy with a good enough elaboration with samples as your files names are not consistent …
    See also the samples in the below Similar Threads section.
    Last edited by Marc L; 04-18-2022 at 08:47 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Move files based on specified file name so a specified folder
    By quinnwits in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-03-2021, 02:24 PM
  2. move files from Source Folder to Destination Folder, based on file name & Path
    By seenai in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-31-2020, 09:29 AM
  3. Move PDF files to a folder based on a criteria
    By lyfsbful in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-01-2020, 05:59 PM
  4. Re: Move Files from folder and sub folder based on date
    By flupsie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-08-2017, 12:15 PM
  5. Create folder and move files to that folder based on file name
    By biznez in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-26-2016, 06:58 PM
  6. move files to folder based on a .igy list
    By henkdevreisch in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-14-2013, 01:42 PM
  7. move files from 1 folder to another based on cell values
    By aravindhan_31 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-26-2010, 01:03 PM

Tags for this Thread

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