spikeman24
MIS
Hi Guys,
I need some serious help in getting a VB script together that can:
Part One
open a text file (sites.txt) then read the file line by line excluding the 1st and last line. Then I want to store the values between the quotation marks in an array.
Sites.txt
-------------------------------------------------------------------------------
<Sites Count="10">
<URL=" Owner="EXT\ellynaj.ba" />
<URL=" Owner="DM1\lishmj" SecondaryOwner="DM1\ennisc" />
<URL=" Owner="DM1\ lishmj.dv" />
<URL=" Owner="DM1\treadawaym" SecondaryOwner="DM1\llewellynaj" />
<URL=" Owner="DM1\studc" SecondaryOwner=" DM1\ ellynaj " />
<URL=" Owner="DM1\ studc " SecondaryOwner="DM1\llewellynaj" />
<URL=" Owner="DM1\ ellynaj" SecondaryOwner="DM1\glenn_da" />
<URL=" Owner="DM1\studdsc" SecondaryOwner="DM1\funks" />
<URL=" Owner="DM1\studc" SecondaryOwner="DM1\bosspr" />
<URL=" Owner="DM1\studc" SecondaryOwner="DM1\bosspr" />
</Sites>
-------------------------------------------------------------------------------
Part Two
From the script run a backup program + site name & specify the backup file name using each of the values/ sites stored in the array. The file name should not contain the http:// part of value in the array. I would also like to include a date at the end of the filename. As an example the script should run the following 10 times as there are 10 sites listed in the file.
Backup.exe –s http://t8.abcd.com –f Daily_backup_t8.abcd.com(mmddyyyy).dat
Backup.exe –s http://t8.abcd.com/carrierevaluk –f Daily_backup_t8.abcd.com/carrierevaluk(mmddyyyy).dat
etc. etc
Hopefully this is possible to do via VBscript.
Thanks very much, I appreciate everyone’s suggestions and feedback
I need some serious help in getting a VB script together that can:
Part One
open a text file (sites.txt) then read the file line by line excluding the 1st and last line. Then I want to store the values between the quotation marks in an array.
Sites.txt
-------------------------------------------------------------------------------
<Sites Count="10">
<URL=" Owner="EXT\ellynaj.ba" />
<URL=" Owner="DM1\lishmj" SecondaryOwner="DM1\ennisc" />
<URL=" Owner="DM1\ lishmj.dv" />
<URL=" Owner="DM1\treadawaym" SecondaryOwner="DM1\llewellynaj" />
<URL=" Owner="DM1\studc" SecondaryOwner=" DM1\ ellynaj " />
<URL=" Owner="DM1\ studc " SecondaryOwner="DM1\llewellynaj" />
<URL=" Owner="DM1\ ellynaj" SecondaryOwner="DM1\glenn_da" />
<URL=" Owner="DM1\studdsc" SecondaryOwner="DM1\funks" />
<URL=" Owner="DM1\studc" SecondaryOwner="DM1\bosspr" />
<URL=" Owner="DM1\studc" SecondaryOwner="DM1\bosspr" />
</Sites>
-------------------------------------------------------------------------------
Part Two
From the script run a backup program + site name & specify the backup file name using each of the values/ sites stored in the array. The file name should not contain the http:// part of value in the array. I would also like to include a date at the end of the filename. As an example the script should run the following 10 times as there are 10 sites listed in the file.
Backup.exe –s http://t8.abcd.com –f Daily_backup_t8.abcd.com(mmddyyyy).dat
Backup.exe –s http://t8.abcd.com/carrierevaluk –f Daily_backup_t8.abcd.com/carrierevaluk(mmddyyyy).dat
etc. etc
Hopefully this is possible to do via VBscript.
Thanks very much, I appreciate everyone’s suggestions and feedback