i'm looking for a reprex on how to use file.symlink
The example in the help file is, typically, less than helpful.
I did see this post, but i don't know what 'data'
is.
My end goal: Move a file from the current directory, to another directory where the path to the location is longer than R will allow (like.. 230 character is the limit for file.copy
or something).
The following code was working until this morning, but no longer does, and I don't know enough about why it's not working now to debug (no error message)
SOW_DIRECTORY <- "really really really long file path"
# \ -- create the symbolic link to that path
create.symlink <- paste0("subst x: ",'"',SOW_DIRECTORY, '"')
system(create.symlink)
file.copy(from = filename, to = file.path("x://", filename))
# \-- remove the copy in the working directory
file.remove(filename)
# \-- remove the symbolic link
system("subst x: /D")
so i was going to try to use file.symlink
instead of subst
.... but am not sure how to actually implement it.