I have a vector of filenames A and I have an equivalent vector of new names for those files -- B.
I was hoping to do:
test <-map2(A, B, ~system2('mv', args=c(.x, .y)))
or perhaps
test <-map2(A, B, ~system2('mv', args=paste(.x, .y)))
but .x and .y don't get interpreted nicely and the command fails.
mv: cannot stat '/home/rob/KRBD_Data/Client_ID/000/raw/monthzips/2015-01/Data_2015-01-07.zip'
If I use rename as the command I get
test <-map2(A, B, ~system2('rename', args=paste(.x, .y)))
Unknown regexp modifier "/r" at (user-supplied code), at end of line
Unknown regexp modifier "/b" at (user-supplied code), at end of line