I know that this question is already almost 3 years old, but I hope that my answer might be useful to others anyway.
I implemented a standardized way to automate the genome retrieval process in R (see biomartr package).
To retrieve a bacterial reference genome from several database sources using only the scientific name of the bacteria of interest one can simply type:
# download Escherichia coli reference genome from NCBI RefSeq
biomartr::getGenome(db = "refseq", organism = "Escherichia coli")
or
# download Escherichia coli reference genome from NCBI Genbank
biomartr::getGenome(db = "genbank", organism = "Escherichia coli")
In case you wish to download all available bacterial genomes at once, simply type:
# download all bacterial reference genomes from NCBI RefSeq
biomartr::meta.retrieval(kingdom = "bacteria", db = "refseq", type = "genome")
For more details about downloading specific genomes from specific kingdoms or subkingdoms of life please consult the Genomic Sequence Retrieval vignette of the biomartr package. For metagenome downloads, please consult the Meta-Genome Retrieval vignette and for entire database retrieval the Database Retrieval vignette.
Please note that to promote computational reproducibility in genomics and metagenomics studies, biomartr stores log files for each downloaded genome, proteome, or CDS file.
An example log file looks as follows:
File Name: Escherichia_coli_genomic_refseq.fna.gz
Organism Name: Escherichia_coli
Database: NCBI refseq
URL:
ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/005/845/GCF_000005845.2_ASM584v2/GCF_000005845.2_ASM584v2_genomic.fna.gz
Download_Date: Wed Feb 15 15:17:50 2017
refseq_category: reference genome
assembly_accession: GCF_000005845.2
bioproject: PRJNA57779
biosample: SAMN02604091
taxid: 511145
infraspecific_name: strain=K-12 substr. MG1655
version_status: latest
release_type: Major
genome_rep: Full
seq_rel_date: 2013-09-26
submitter: Univ. Wisconsin
Single bacterium; single bacterial species;
single bacteria.