Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DPC18WWQ6BT602AB0
- ....
- AG_DPC18WWQ6BT602-A1.job
- [Automatoin]
- Process=Auto
- PO=D:POfiles
- [BIDINFO]
- BID=18WWQ6BT602
- PFX=DPC
- CRM=A1
- $PO_Path = $Config_File.Automation_Config.Path.POfiles
- $Job_Path = $Config_File.Automation_Config.Path.JOB
- if(SWPO_Map -eq $true)
- {
- Write-Host ">>Get SWPO Files"
- $PO_Content = Get-Content -path $PO_Path*
- $POfile = Get-ChildItem -Name $PO_Path
- $FilteredContents = $PO_Content | Where-Object {$_ -like "*;CRM*"}
- $CRM = $FilteredContents.Substring(5,2)
- $Count = 1
- Foreach ($POfile in $PO_Path)
- {
- Foreach($CRM in $CRM){
- try {
- New-Item -ItemType File -Path "$Job_PathAG_$Prefix$BID-$CRM.job" -Force
- $Output_JOB = "[Automatoin]", "Process=Auto","PO=$POfile", " ", "[BIDINFO]", "BID=$BID", "PFX=$Prefix", "CRM=$CRM" | Out-File "$Job_PathAG_$Prefix$BID-$CRM.job" -Encoding oem
- $Count += 1
- }
- catch {
- Write-Host "NO CRM"
- }
- }
- }
- }
- else
- {
- Write-Host "SWPO Not Found"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement