Hello,
My script is failing at the following move command, right after the
capturing of a bunch of files in a directory. My glob is a big one. It’s
checking against 49 different file prefixes. Is that a problem? All I
want it to do for now is copy any files that conform to one of those
prefixes.
Thanks.
require ‘FileUtils’
…
ps2kfiles =
Dir.glob("{aacmc7,acm059,acm061,acmc59,acmt59,adc064,adm065,cbncc7,cgmpr,cpslit,cpsmco,edc131,edt131,eeomc7,emgc15,hcc201,hcci01,hct201,hcti01,hla020,hlai20,hlb020,hlbi20,hltc20,hlti20,ierc78,itc101,jsc047,lrc013,lrfl21,lrnm21,lrrc21,lrrc22,lrrc24,lrrc37,lrrc49,lrrc74,lrrmc6,lrrt37,lrt013,mopc68,mopd68,mopec8,mopt68,pgc117,pslc45,psvc45,rtc129,uln007,}*.pdf")
ps2kfiles.each do |ps2kfile|
FileUtils.mv ‘#{ps2kfile}’, ‘C:/scripts/ruby/temp/test/indextemp/ps2k/’
end