C
Clement Ow
I want to use each index of the array and loop it in such a way that the
path names can be passed into Dir so that i can carry out multiple
copies from different sources. unfortunately, it showed error while
trying to run the script. Any suggestions?
$DEST="U:/test1"
source=["C:/movtest/testing", "C:/movtest", "U:/movtest",
"U:/movtest/new", "U:/movtest/new1"]
j=source.length - 1
i= -1
while i<j
Dir.chdir(source)
print Dir.getwd
FileUtils.cp_r Dir.glob('2008*'), $DEST
i+=1
end
path names can be passed into Dir so that i can carry out multiple
copies from different sources. unfortunately, it showed error while
trying to run the script. Any suggestions?
$DEST="U:/test1"
source=["C:/movtest/testing", "C:/movtest", "U:/movtest",
"U:/movtest/new", "U:/movtest/new1"]
j=source.length - 1
i= -1
while i<j
Dir.chdir(source)
print Dir.getwd
FileUtils.cp_r Dir.glob('2008*'), $DEST
i+=1
end