+ Reply to Thread
Results 1 to 2 of 2

how to copy and paste folders / subfolders and files

  1. #1
    Registered User
    Join Date
    07-25-2017
    Location
    Oiho
    MS-Off Ver
    2010 standard
    Posts
    90

    how to copy and paste folders / subfolders and files

    With VBA excel code: I was wondering if it is possible to select a folder and a sub folder with its files and copy and paste it to another place?

  2. #2
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: how to copy and paste folders / subfolders and files

    Quote Originally Posted by ColemanJames View Post
    ... is possible... ?
    Yes

    1. Variant with such commands as:
    FileCopy source, destination; Name oldpathname As newpathname
    MkDir path; Dir (pathname, attributes)
    ChDrive drive; ChDir path; CurDir drive
    Kill pathname; RmDir path

    2. Variant with FSO (Scripting.FileSystemObject)

    3. Variant with Shell command and 'xcopy' or 'robocopy'

    e.g. Variant 2:
    Please Login or Register  to view this content.
    But it has limitations that can cause errors when copying.

+ 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] macro to delete files with partial match name in folders and subfolders
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 05-19-2021, 02:29 PM
  2. Copy Paste data from Files within Subfolders
    By lyla22 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 11-08-2016, 11:45 AM
  3. [SOLVED] Macro to Copy and paste folders and subfolders without files in it
    By Madhut in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-07-2016, 01:47 PM
  4. Needs macro to copy excel files from folders, subfolders to new folder
    By genetist in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-08-2014, 08:53 AM
  5. [SOLVED] Search for files in folders and subfolders
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-16-2014, 08:43 AM
  6. [SOLVED] Map/List of folders, subfolders & files
    By Bogdan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-11-2006, 01:10 PM
  7. [SOLVED] copy subfolders, replace text in files and save files in copied subfolders
    By pieros in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-01-2005, 09:05 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