Trying to use an Array with in an Array, first time trying this and don’t even know if at all possible, as I would normally using recordsets, but not an option in this scenario.
Should loop through the Journal Type array, and for each Journal Type it should loop through the Region array, any pointers to where I am going wrong or if a better solution, I’d be post greatful.
Thanks
Geoff
Dim oFSO, oflder, oColl
Dim vRegion, vJournal_Type, vFolder_1, vFolder_2, vFile_1, vFile_2
Dim aJournal_Types, aRegions
Dim Current_Date
Set oFSO = CreateObject("Scripting.FileSystemObject")
Current_Date = Now
vFolder_1 = REMOVED
vFolder_2 = REMOVED
aJournal_Types = Array("AAA", "CJP", "IRT")
aRegions = Array("APAC", "Canada", "EMEA", "LATAM")
Variable_0 = Year(Current_Date) & "." & Right("0" & Month(Current_Date),2)
For Each Item In aJournal_Types
vJournal_Type = aJournal_Types.Item
For Each Item in aRegions
vRegion = aRegions.Item
vFolder_1 = vFolder_1 & "" & vJournal_Type & "" & Variable_0 & "" & vRegion & "*"
vFolder_2 = vFolder_2 & "" & vJournal_Type & "" & Variable_0 & "" & vRegion
Set oflder = oFSO.GetFolder(vFolder_1)
Set oColl = ofldr.Files
For Each File in oColl
oFSO.MoveFile vFolder_1, vFolder_2
Next
Next
Next
Set oColl = Nothing
Set oflder = Nothing
Set oFSO = Nothing