Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Combining multiple arrays into one

$
0
0

I am sure this is probably really simple to do, but for some reason I just cannot figure it out.  

I am creating an HTA that will be used to backup terminated employee's PC.  It will scan the drive for the specific file Types chosen and XCopy them up to the server.

Originally I had the different file types writing into Strings and then just combining those strings.  I was deliminating the entries with a ;.  The issue I ran into is when combining them I have to have a ; in front of the first entry, the issue starts if someone only choose one file type.  Then it looks for any file with no extensions, which is a lot.  

So then I thought I would just put them into their own arrays and then combine those arrays, but this just seems to be above my head.  I cannot wrap my mind around it.  

Writing it in VBScript.  Here is the a snippet of the section I am working on.  Everything else in the script/HTA works fine. 

Sub Extensions(strEndUserFolder)
	If Office.checked Then strOfficeExtensions = "doc;docx;docm;xls;xlt;xlm;xlsx;xlsm;ppt;pps;pptx;pptm;ppsx;ppsm;mdb;ldb;one;onetoc2"
	If PDF.checked Then strPDFExtensions = "pdf"
	If SRA.checked Then strSRAExtensions = "rws"
	If Pictures.checked Then strPictureExtensions = "bmp;jpg;jpeg;gif;tiff;png"
	If Videos.checked Then strVideoExtensions = "mp4;mov;mpeg;mpg;wmv;mov"
	If Notes.checked Then strNotesExtensions = "id"
	If CADUG.checked Then strCADUGExtensions = "dwg;dwt;dxf;dwf;dst;prt"
	arrOfficeExtensions = Split(strOfficeExtensions, ";")
	arrPDFExtensions = Split(strPDFExtensions, ";")
	arrSRAExtensions = Split(strSRAExtensions, ";")
	arrPictureExtensions = Split(strPictureExtensions, ";")
	arrVideoExtensions = Split(strVideoExtensions, ";")
	arrNotesExtensions = Split(strNotesExtensions, ";")
	arrCADUGExtensions = Split(strCADUGExtensions, ";")
	arrExtensions = 
	Call SetDrivetoScan(arrExtensions, strEndUserFolder)

End Sub


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>