I need to download a file, save it in a folder while keeping the original filename from the website.
url <- \"http://www.seg-social.es/prdi00/idcplg?IdcSe
I think basename() would be the simplest option https://www.rdocumentation.org/packages/base/versions/3.4.3/topics/basename
basename()
e.g.
download.file(url, basename(url))