Read our blogs, tips and tutorials
Try our exercises or test your skills
Watch our tutorial videos or shorts
Take a self-paced course
Read our recent newsletters
License our courseware
Book expert consultancy
Buy our publications
Get help in using our site
560 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owl trainers only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Search our website
We also send out useful tips in a monthly email newsletter ...
Software ==> | SSIS Integration Services (28 exercises) |
Topic ==> | Looping over files (3 exercises) |
Level ==> | Relatively easy |
Subject ==> | SSIS training |
This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.
Imagine an alternative universe in which Nigel Farage (remember him?) had been elected as Prime Minister, and in which it was now mandatory to keep a copy of files with names containing the letters UK in a separate folder.
Create a package called Housekeeping, and within this a string variable called FilePath to hold the name/path of each file that you find:
Make sure you put something for the variable value.
Create a new folder called Copied files on your computer's desktop.
Loop over all of the files on your USB stick (or in the folder on your computer containing the files for this course), finding the ones whose names contain the letters UK and copying them to your new Copied files folder:
The comment shown here is an annotation, to explain what the expression constraint is doing. The package should loop over all of the files in the folder containing your course files, checking to see if each contains the letters UK (see expression below) and copying it to your new folder if it does.
Here's what you could put for the expression constraint:
FINDSTRING(UPPER(@[User::FilePath]),"UK",1) > 0
When you've got this working, delete the folder and close down your package.
You can find other training resources for the subject of this exercise here:
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2024. All Rights Reserved.