+ Reply to Thread
Results 1 to 3 of 3

Create New Folder Based on Cell Name and Copy Files into it

  1. #1
    Registered User
    Join Date
    08-20-2020
    Location
    Milan
    MS-Off Ver
    2016
    Posts
    13

    Create New Folder Based on Cell Name and Copy Files into it

    Hi All,

    I am new in VBA.
    I would like to create new folder based on cell value in a sheet (Sheet3 (Cover Page) Cell B4) and with this new folder, I would like to copy multiple documents from the list (Sheet 4 Cell B5:B30) from source folder into created folder. The document list is with extension (.pdf, .docx, etc). In addition, I also would like to prevent to create folder with same name.
    At this moment, I can make new folder based on cell and also can copy document in the list, but don't know how combine this two things.
    Any help would be appreciated.
    Thanks in advance.

    Please Login or Register  to view this content.

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Create New Folder Based on Cell Name and Copy Files into it

    your first routine is fine. so what doesn't work in the 2nd one? you are using a const to store a range, then throwing it into an array. if that does indeed work, than you can just expand on it.
    loop the array and use the fileCopy method and/or call DOS command called xCopy. the DOS cmd would need the appropriate switches though

  3. #3
    Registered User
    Join Date
    08-20-2020
    Location
    Milan
    MS-Off Ver
    2016
    Posts
    13

    Re: Create New Folder Based on Cell Name and Copy Files into it

    Hi,
    if you have same problem, I have already solved this. you can find it in this link

    https://stackoverflow.com/questions/...86429#63886429

    Have a good day

+ 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. [SOLVED] Copy PDF files from one folder to another based on a cell list
    By amberle in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-20-2020, 05:02 AM
  2. Replies: 4
    Last Post: 09-30-2019, 03:47 PM
  3. Copy Files from One Folder to Another Folder based on a List In Excel
    By civram1982 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-21-2019, 06:34 AM
  4. 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
  5. Copy Files from one folder to different folders based on pdf file name
    By jtammyg in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-23-2014, 11:49 AM
  6. Copy files based on the hyperlinkes to a folder
    By cssdna in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-21-2012, 08:55 AM
  7. [SOLVED] Create a new folder based on a cell name or value and save copy onto that folder
    By Le_Tiago in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-20-2012, 01:33 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