[R] Rename a directory in R

Gavin Blackburn gavin.blackburn at strath.ac.uk
Tue Nov 8 17:14:09 CET 2011


Thanks Jim,

I didn't think it worked on directories but I've got it working now.

Cheers,

Gavin.

-----Original Message-----
From: jim holtman [mailto:jholtman at gmail.com] 
Sent: 08 November 2011 14:18
To: Gavin Blackburn
Cc: r-help at r-project.org
Subject: Re: [R] Rename a directory in R

apropos('rename')

you will find 'file.rename' which also works on directories.

On Tue, Nov 8, 2011 at 7:45 AM, Gavin Blackburn
<gavin.blackburn at strath.ac.uk> wrote:
> Hi,
>
> I want to be able to rename a folder using R, similar to file.rename. I want to paste " - done" onto the folder name. The reason for this is we run a loop on a large number of folders on a server and it would be nice for people to be able to log in and instantly see if their data has been processed so they can remove it.
>
> I have searched the help list but have not found anything and was wondering if this is possible?
>
> I realise I could probably do this through the R/system command line interface but I thought there may be a simpler way to do this through R.
>
> Many thanks,
>
> Gavin.
>
> Dr. Gavin Blackburn
> SULSA Technologist
>
> Strathclyde institute of Pharmacy and Biomedical Science
> 161 Cathedral Street,
> Glasgow.
> G4 0RE
>
> Tel: +44 (0)1415483828
>
> ScotMet: The Scottish Metabolomics Facility
> www.metabolomics.strath.ac.uk<http://www.metabolomics.strath.ac.uk>
>
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Jim Holtman
Data Munger Guru

What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.



More information about the R-help mailing list