Mosaab Asli

Bulk Converter: job to jxl [Powershell]

Blog Post created by Mosaab Asli on Jun 22, 2019

Hello, 

 

I would like to introduce a job to jxl bulk converter

 

cmd script name: start.bat

powershell script name: J2J.ps1

 

Start.bat

@echo off

cls
powershell.exe -ExecutionPolicy ByPass -File J2J.ps1 -noexit
timeout 5

 

J2J.ps1

Write-Host ++++JOB2JXL++++

$myJobsPath = "C:\Users\***\Desktop\Job2JXL\Jobs"      <-- JOBS PATH
$myAsciiPath = "C:\Users\***\Desktop\Job2JXL\Ascii"      <---Ascii File Generator PATH

$files = Get-ChildItem $myJobsPath
for ($i=0; $i -lt $files.Count; $i++) {

   $infileVN = $files[$i].FullName
   $infile = $files[$i]
   $infile_ = $infile -split '[.]'
   $infile_ = $infile_[0]
   Write-Host $infileVN
   & $myAsciiPath\AsciiFileGenerator.exe "$infileVN" "Trimble JobXML" "$infile_"
}

 

The JXL files will be saved with the same JOB files name.

 

i hope this helps.

Attachments

Outcomes