just to complete your question, you can do it in R in one line.
After setting the directory as your working directory, just type the following:
file.rename(list.files(pattern = "vcf"), paste0("A",1:length(list.files(pattern = ".vcf")),".vcf"))
Maybe you can try file.rename(list.files(pattern = ".vcf"), paste0("A",1:length(list.files(pattern = ".vcf")),".vcf"))
. Also, if there is still an error, can you post the output of list.files(pattern = ".vcf")
just to see the structure of your files in folder (maybe one file has a weird name not detected by the pattern).