We're aware that some users are experiencing technical issues which the team are working to resolve. See the Community Noticeboard for more info. Thank you for your patience.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

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

Options
2»

Comments

  • Cornucopia
    Cornucopia Posts: 16,470 Forumite
    Part of the Furniture 10,000 Posts Name Dropper Photogenic
    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: 148 Forumite
    Seventh Anniversary 100 Posts Name Dropper
    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,470 Forumite
    Part of the Furniture 10,000 Posts Name Dropper Photogenic
    Excel - it's not just for Accountants. :)
  • that
    that Posts: 1,532 Forumite
    have a fiddle with freefilesync think it does what you want and offers visual selection
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 350.8K Banking & Borrowing
  • 253K Reduce Debt & Boost Income
  • 453.5K Spending & Discounts
  • 243.8K Work, Benefits & Business
  • 598.6K Mortgages, Homes & Bills
  • 176.8K Life & Family
  • 257K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.1K Discuss & Feedback
  • 37.6K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.