We'd like to remind Forumites to please avoid political debate on the Forum... Read More »
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
Comments
-
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 thedrive 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.
0 -
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.
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.0 -
Excel - it's not just for Accountants.0
-
have a fiddle with freefilesync think it does what you want and offers visual selection0
-
See also:
Robocopy https://en.m.wikipedia.org/wiki/Robocopy and
RichCopy https://technet.microsoft.com/en-us/library/2009.04.utilityspotlight.aspx0
This discussion has been closed.
Confirm your email address to Create Threads and Reply

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