Nested for-loop, searching files
Posted
by
user2961510
on Stack Overflow
See other posts from Stack Overflow
or by user2961510
Published on 2013-11-06T17:16:18Z
Indexed on
2013/11/07
3:55 UTC
Read the original article
Hit count: 139
I have two files:
filetest.txt
============
SSISPACKAGE1.dtsx
SSISPACKAGE2.dtsx
SSISPACKAGE3.dtsx
SSISPACKAGE4.dtsx
SSISPACKAGE5.dtsx
SSISPACKAGE6.dtsx
SSISPACKAGE7.dtsx
SSISPACKAGE8.dtsx
filetest2.txt
=============
\\central_test_server\SSIS_Packages\Daily.bat
\\central_test_server\SSIS_Packages\Weekly.bat
\\central_test_server\SSIS_Packages\Monthly.bat
\\central_test_server\SSIS_Packages\Quarterly.bat
\\central_test_server\SSIS_Packages\SemiAnnually.bat
\\central_test_server\SSIS_Packages\Annually.bat
What I need is to cycle through filetest.txt, then search the files identified in filetest2.txt for the filename and output to a file the results. I am trying to identify in well over 100 bat files where each of about 100 SSIS Packages are running.
I'm doing this in Windows batch, have tried about 20 various approaches without success - any help would be greatly appreciated.
© Stack Overflow or respective owner