Script to copy a subset of files to a new drive/directory

Options
2»

Comments

  • Cornucopia
    Cornucopia Posts: 16,177 Forumite
    First Anniversary Name Dropper First Post Photogenic
    Options
    KingL wrote: »
    that's the ticket - works perfectly, thanks a lot :)

    Happy to help - I always enjoy getting the tech to save a bit of otherwise tedious manual effort. This technique of using a spreadsheet to create a BAT file is very powerful - you can even build in an element of intelligence with an IF formula, DATE/TIME etc.

    If you needed something more elaborate in the future, I'd suggest looking at VBScript. This is a simple scripting language that runs natively on Windows (i.e. no app needs downloading to run it).

    I have a VBScript that creates a disk-mirror between the D: drive of my laptop (where I do all my work) and the network-attached backup drive on my router. It took a little while to get it to work exactly as I wanted it to, but it now just sits there creating an on-going backup of my work with zero effort. :)
  • steviebuk
    steviebuk Posts: 146 Forumite
    First Anniversary First Post Name Dropper
    Options
    Cornucopia wrote: »
    The easiest way (without coding) to do this kind of thing is to use Excel (or the excellent, free Google Spreadsheet) to create a batch file from your file list. You use formulas to create each line of the script from your list.

    e.g.

    Column A: holds your list
    Column B: holds your destination folder for each entry (could be derived from [A] using a formula
    Column C: holds a formula that takes [A] and and combines them into a copy command. There's a forum limitation on adding script elements to posts, so I've put an image of the example below.

    Then copy Column C into a text file, add a ".BAT" suffix and double click it in File Manager.

    jrrwo1.png


    WHAT! Is this some sort of wizardy!?!? I've been in IT for over 10 years and never knew you could do this in Excel :)


    Nice.
  • Cornucopia
    Cornucopia Posts: 16,177 Forumite
    First Anniversary Name Dropper First Post Photogenic
    Options
    Excel - it's not just for Accountants. :)
  • that
    that Posts: 1,532 Forumite
    Options
    have a fiddle with freefilesync think it does what you want and offers visual selection
This discussion has been closed.
Meet your Ambassadors

Categories

  • All Categories
  • 343.6K Banking & Borrowing
  • 250.2K Reduce Debt & Boost Income
  • 449.9K Spending & Discounts
  • 235.7K Work, Benefits & Business
  • 608.7K Mortgages, Homes & Bills
  • 173.3K Life & Family
  • 248.3K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 15.9K Discuss & Feedback
  • 15.1K Coronavirus Support Boards