It looks like you're new here. If you want to get involved, click one of these buttons!
Download TRT, install it, and look in TRT > File actions > Batch convert file types.
You will probably want to pull out just the code you need to make your own custom .rb file, and also read up on how to run from command line
Please post your completed script here when done, to help others with the same question.
klayout -rd input=$1 -rd output=$2 -r ./inout.rb -zz
opt = RBA::SaveLayoutOptions::new
opt.oasis_substitution_char = ""
ly = RBA::Layout::new