+ Reply to Thread
Results 1 to 6 of 6

Using Excel as data migration tool; source file paths in a column to new destination

  1. #1
    Registered User
    Join Date
    12-12-2019
    Location
    St. Louis, MO
    MS-Off Ver
    2016 MS Office 365
    Posts
    3

    Lightbulb Using Excel as data migration tool; source file paths in a column to new destination

    I have been at this for days now trying different methods and pouring through internet for similar questions. All I've come across is paid tools. My predecessor had a workbook that would take a list of file paths of .doc and .pdf files from a sharepoint folder and copy them to a new destination; I know its possible, I just cant figure out how, he deleted the file when he left.

    The source file are all in sharepoint. All the .docs are in one folder and all of the .pdfs come from another. We arent moving the whole folder, only those that meet certain criteria. Which is why we are using the excel sheet to capture the files we want to move. We have over 9000 files.

    I have the path of each individual .doc file we wish to move in column A and its paired .pdf in column B. All of the .docs will copy to a DOC folder and all of the PDFs will copy to a PDF destination folder.

    Please tell me there is an easy macro for this? HELP!

  2. #2
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Using Excel as data migration tool; source file paths in a column to new destination

    This will get you started.

    https://analystcave.com/vba-filesyst.../vba-movefile/

    You wiil just need to set up a loop through Column A & B.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  3. #3
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: Using Excel as data migration tool; source file paths in a column to new destination

    try
    if you can have a separate coumn for the filenames
    column A --> docs path including the filename and extension
    column B --> docs filename (including extension)
    column C --> pdfs path including the filename and extension
    column B --> pdfs filename (including extension)

    data starts at row 2

    Please Login or Register  to view this content.
    edit:
    i have never used sharepoint so im not sure how paths as a source in sharepoint works
    Last edited by k1dr0ck; 12-13-2019 at 05:15 AM.

  4. #4
    Registered User
    Join Date
    12-12-2019
    Location
    St. Louis, MO
    MS-Off Ver
    2016 MS Office 365
    Posts
    3

    Re: Using Excel as data migration tool; source file paths in a column to new destination

    We are only moving files associated with specific content attributes (product, client, etc) so I have to use the list in Column A I cant just filter for pdfs and docs out of source folder.

    How would I reference my list in column A and use that for a Macro to say find file in A2 in source location and move to destination then go to A3 and so one.

  5. #5
    Registered User
    Join Date
    12-12-2019
    Location
    St. Louis, MO
    MS-Off Ver
    2016 MS Office 365
    Posts
    3

    Re: Using Excel as data migration tool; source file paths in a column to new destination

    This is similar to what I've been trying... the only difference I know with sharepoint is I have to use the UNC path format. I think sharepoint is my problem child variable in this. I ran above with a "normal" folder as source with some test data and it worked perfect... when I throw the sharepoint path in there it just spins and errors out.

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Using Excel as data migration tool; source file paths in a column to new destination

    It would be something like this.

    Please Login or Register  to view this content.
    Does the newfilename need to be extracted from Column A values ?

    If so can you post an example of a fullfilepath of a file to be moved.

+ 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. Export Data From one source to multiple destination"Destination not in the same format"
    By Ali Rashed in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-25-2017, 06:52 AM
  2. [SOLVED] Copy and paste certain data from source to destination file
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 58
    Last Post: 01-24-2015, 04:02 PM
  3. Need macro help to copy from specify source file,sheet,range to specified destination file
    By Raghuram K B Reddy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-03-2014, 09:43 AM
  4. Macro to copy and paste source file to destination file using cell value
    By mani88 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-15-2013, 10:16 AM
  5. [SOLVED] Copy from Source to Destination - row by row and by column operation
    By kanagalakshimi in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-07-2013, 02:24 AM
  6. [SOLVED] Unable to copy data from source excel to destination excel workbook
    By Lui23 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-21-2012, 07:22 AM
  7. [SOLVED] How to update destination file with source files closed?
    By Alex Costache in forum Excel General
    Replies: 2
    Last Post: 08-01-2006, 05:10 AM

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