+ Reply to Thread
Results 1 to 6 of 6

VB code to rename pdf files from certain location and move to the root directory

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    VB code to rename pdf files from certain location and move to the root directory

    Hello:

    I have lots folders in say C:\ScannedFiles

    The name of the folder names as Digit number OR TEXT
    Example : i have folder names
    1538
    17
    109
    138
    BN
    LJ
    LB
    DIYA
    HARI

    Within these folders there are SUBOLDERs and within these SUBFOLDERS, there are pdf files
    in following format, Example
    C:\ScannedFiles\1538\XYZ\MM-DD-YYYY-4DigitNumber-*.pdf
    C:\ScannedFiles\1538\XPX\MM-DD-YYYY-4DigitNumber-*.pdf

    4DigitNumber will be any number between 1to9999
    * is any text after 4DigitNumber- and .pdf

    I need VB Code to do the following.

    Go thru each of Digit Number folder ONLY.
    Go to each of its subfolders, rename the pdf file by deleleting 4DigitNumber and '-" and move that file
    at C:\ScannedFiles
    So now per above example, the files will be in C:\Scannedfiles as below

    C:\ScannedFiles\MM-DD-YYYY-*.pdf

    Please let me know if you have any questions.
    Thanks.

    Riz

  2. #2
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB code to rename pdf files from certain location and move to the root directory

    Hello:

    Can any one help to solve this problem.
    Thanks a lot in advance

    Riz

  3. #3
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB code to rename pdf files from certain location and move to the root directory

    Hello:

    If any one need more clarification then i am willing to work.
    Please help

    Thanks a lot
    Riz

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,122

    Re: VB code to rename pdf files from certain location and move to the root directory

    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  5. #5
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB code to rename pdf files from certain location and move to the root directory

    Hello sintek:

    Thanks a lot for great help.

    Riz

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,122

    Re: VB code to rename pdf files from certain location and move to the root directory

    Pleasure...tx for rep +

+ 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. Rename and move files to a prespecified location
    By Chrysanthiiiiii in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-09-2019, 11:45 AM
  2. Rename Files and move them to a cell related location
    By Chrysanthiiiiii in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-06-2019, 11:55 AM
  3. VBA code to open all files in a directory and move data to destination sheet
    By anthony777 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-08-2017, 04:45 PM
  4. [SOLVED] VBA code to open all files in a directory and move data to destination sheet
    By anthony777 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-07-2017, 04:10 PM
  5. Ceate a root directory to select multiple files at once.
    By B_Jarbs in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-12-2016, 04:06 PM
  6. Excel Macro Code Request for List files and Move specified directory
    By ganeshinscribe in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 03-19-2012, 08:38 AM
  7. Problem with code - move files to another directory
    By uncleslinky in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-14-2011, 10:06 AM

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