renameGPXfile | R Documentation |
Rename gpx filenames but also, importantly, adjusting the track name in the <name>
tag.
renameGPXfile(fold, fnew, pnew = "renamed")
fold |
Name for “old” GPX file. |
fnew |
Name for “new” GPX file. |
pnew |
Path after the working directory to contain the “new” GPX files. |
NONE YET
None, used for side effect of writing new GPX files to the pth
directory (and possibly deleting now old GPX files from the same directory).
Derek H. Ogle
## Not run:
## Set working directory to where the files are
## Single file
renameGPXfile("NCTBF01","NCTBF001")
## Example of multiple files with a consistent file change pattern
olds <- c("NCTBF01","NCTBF07a")
news <- stringr::str_replace(olds,"NCTBF","NCTBF0")
cbind(olds,news)
renameGPXfile(olds,news)
## Example of multiple files to get new numbers padded with zeroes
olds <- c("NCTBF01","NCTBF07a")
news <- paste0("NCTBF",stringr::str_pad(seq_along(olds),width=3,pad=0))
cbind(olds,news)
renameGPXfile(olds,news)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.