+ Reply to Thread
Results 1 to 2 of 2

Copying files from one folder to another using command prompt and batch files

  1. #1
    Registered User
    Join Date
    08-19-2012
    Location
    Denver
    MS-Off Ver
    Excel 2007
    Posts
    85

    Copying files from one folder to another using command prompt and batch files

    Hello,

    I have a folder called "Original" with a number of PDFs:

    1.pdf
    2.pdf
    3.pdf
    4.pdf

    I also have a spreadsheet with three PDfs listed from cells A1-A3:

    1.pdf
    2.pdf
    4.pdf

    How can I copy PDFs 1, 2, and 4 from the original folder to a new folder called "Copied" using command prompt?

    I think somehow I can save a batch file from the data in the spreadsheet I have and then call that file using command prompt?

    I'm an intermediate Excel user and beginner of cmd,

    I realize this could be a lengthy answer, so does anyone have any ideas, or perhaps a link to a step by step instruction of how to complete this?

    Thank you!
    Matt

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Copying files from one folder to another using command prompt and batch files

    How about running a macro from the spread sheet to copy the files?

    Something like this perhaps.

    Please Login or Register  to view this content.
    The macro assumes that the names of the files you wish to copy are in column A starting at cell A1. You will have to change the target folder i.e. "NewFolder" to the folder where you wish to copy the files.

    The macro loops through cells in column A picks up the file name and copies it to the target folder.

    Alf

+ 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. Replies: 1
    Last Post: 01-28-2019, 06:55 PM
  2. copying data from excel files in a source folder to target folder
    By Javed07 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-22-2013, 04:27 PM
  3. Copying files to to new folder using vba???
    By jonn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-09-2008, 07:03 PM
  4. Creating a folder and copying files to it
    By emmamaki in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-28-2007, 05:21 PM
  5. Extracting/copying files from a folder using VBA
    By Bhupinder Rayat in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 11-14-2005, 05:15 PM

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