Re: [R] Copy and Rename Folder in same directory

2017-05-08 Thread peter dalgaard
> On 8 May 2017, at 13:54 , Duncan Murdoch wrote: > > On 08/05/2017 7:12 AM, Archit Soni wrote: >> Hey Duncan, >> >> There are no sub folders in the folder which its content i want to copy. >> Just 4 files. > > Okay, so you won't need "recursive = TRUE". Um, wouldn't it work just to do file

Re: [R] Copy and Rename Folder in same directory

2017-05-08 Thread Duncan Murdoch
On 08/05/2017 7:12 AM, Archit Soni wrote: Hey Duncan, There are no sub folders in the folder which its content i want to copy. Just 4 files. Okay, so you won't need "recursive = TRUE". list.files('Old Folder Path') gives me the files in this folder. That's not the same as you typed below.

Re: [R] Copy and Rename Folder in same directory

2017-05-08 Thread Archit Soni
No Ben, I want to copy the contents and have the original file is as master file. On Mon, May 8, 2017 at 4:42 PM, Ben Tupper wrote: > My eye gets drawn immediately to file.rename() - did you give that a shake? > > > > On May 8, 2017, at 6:59 AM, Archit Soni wrote: > > Hey Ben, > > I tried this,

Re: [R] Copy and Rename Folder in same directory

2017-05-08 Thread Archit Soni
Hey Duncan, There are no sub folders in the folder which its content i want to copy. Just 4 files. list.files('Old Folder Path') gives me the files in this folder. I am running this line that gives me False when running for all the 4 files file.copy(list.files(oldFolder),newFolder,recursive = T

Re: [R] Copy and Rename Folder in same directory

2017-05-08 Thread Ben Tupper
My eye gets drawn immediately to file.rename() - did you give that a shake? > On May 8, 2017, at 6:59 AM, Archit Soni wrote: > > Hey Ben, > > I tried this, > > # identify the folders > current.folder <- "C:/Where my files currently live" > new.folder <- "H:/Where I want my files to be copied

Re: [R] Copy and Rename Folder in same directory

2017-05-08 Thread Duncan Murdoch
On 08/05/2017 6:59 AM, Archit Soni wrote: Hey Ben, I tried this, # identify the folders current.folder <- "C:/Where my files currently live" new.folder <- "H:/Where I want my files to be copied to" # find the files that you want list.of.files <- list.files(current.folder, "SDM\\.tif$",full.nam

Re: [R] Copy and Rename Folder in same directory

2017-05-08 Thread Archit Soni
Hey Ben, I tried this, # identify the folders current.folder <- "C:/Where my files currently live" new.folder <- "H:/Where I want my files to be copied to" # find the files that you want list.of.files <- list.files(current.folder, "SDM\\.tif$",full.names=T) # copy the files to the new folder fi

Re: [R] Copy and Rename Folder in same directory

2017-05-08 Thread Archit Soni
Thanks Ben. :) On May 8, 2017 16:06, "Ben Tupper" wrote: > Hi, > > Checkout all of the functions for file/directory management under ?files > (note the plural). > > Cheers, > Ben > > > > On May 8, 2017, at 6:30 AM, Archit Soni > wrote: > > > > Hello, > > > > Forgive me to ask this kind of naive

Re: [R] Copy and Rename Folder in same directory

2017-05-08 Thread Ben Tupper
Hi, Checkout all of the functions for file/directory management under ?files (note the plural). Cheers, Ben > On May 8, 2017, at 6:30 AM, Archit Soni wrote: > > Hello, > > Forgive me to ask this kind of naive question. > > But it would be of immense help if you could help me suggesting a

[R] Copy and Rename Folder in same directory

2017-05-08 Thread Archit Soni
Hello, Forgive me to ask this kind of naive question. But it would be of immense help if you could help me suggesting a way to copy a folder in the same directory and paste it in the same directory with different name. Ex: C:/Folder A -- C:/Folder A_B Contents should be copied as is. Thanks f