[R] Create and read symbolic links in Windows

Uwe Ligges ligges at statistik.tu-dortmund.de
Sat May 25 19:59:40 CEST 2013



On 25.05.2013 19:58, Uwe Ligges wrote:
>
>
> On 24.05.2013 04:03, Santosh wrote:
>> Dear R experts,
>>
>> This time I am unable create symbolic links to files as I had done last
>> time. I could not replicate what I had successfully tried last time
>> (rerun
>> the same code without any modifications) .
>>
>> I get the following error message..
>> [1] FALSE
>> Warning message:
>> In file.link(".file1", file2,  :
>>    cannot link './File1' to './file2', reason 'The specified network
>> name is
>> no longer available'
>
> Same here,

Nonsense, I meant to write "Works here" or some such ...

Best,
Uwe Ligges

> and it worked for me, what was you actual call and permissions?
>
> Please carefully read ?file.link and its section "Symbolic links on
> Windows:"
>
> Best,
> Uwe Ligges
>
>
>
>>
>> The "file.exists", however, results TRUE when I test for source and
>> target
>> folders and the source file.. I tried with mapping of drives , relative
>> folder path,and nothing worked.
>>
>> The R version (on 64-bit Windows 7):
>>
>>> version
>>                 _
>> platform       x86_64-w64-mingw32
>> arch           x86_64
>> os             mingw32
>> system         x86_64, mingw32
>> status
>> major          3
>> minor          0.0
>> year           2013
>> month          04
>> day            03
>> svn rev        62481
>> language       R
>> version.string R version 3.0.0 (2013-04-03)
>> nickname       Masked Marvel
>>
>> Any suggestions are highly welcome!
>>
>> Thanks,
>> Santosh
>>
>>>
>>
>>
>> On Fri, May 3, 2013 at 11:30 AM, Santosh <santosh2005 at gmail.com> wrote:
>>
>>> Just got it right.... please ignore the previous posting...
>>>
>>> It worked!
>>>   Prof Ripley made my day!! :) THANK YOU!
>>>
>>>
>>> On Fri, May 3, 2013 at 11:23 AM, Santosh <santosh2005 at gmail.com> wrote:
>>>
>>>> Thanks for your suggestion... I upgraded to R.3.0.0 in 64-bit Windows 7
>>>> environment..
>>>>
>>>> This time when I use file.link..
>>>> I get the following error message: 'Cannot create a file when that file
>>>> already exists"
>>>> And I don't see the link.
>>>>
>>>> The other function, file.copy, correctly copies to the target location.
>>>>
>>>> Still confuse with the error msges...
>>>>
>>>> Thanks,
>>>> Santosh
>>>>
>>>>
>>>> On Thu, May 2, 2013 at 11:42 PM, Prof Brian Ripley
>>>> <ripley at stats.ox.ac.uk
>>>>> wrote:
>>>>
>>>>> On 03/05/2013 07:33, Santosh wrote:
>>>>>
>>>>>> Thanks for the suggestions. In windows (Windows 7, 64-bit), I
>>>>>> couldn't
>>>>>> get "file.symlink" to work, but "file.link" did return the result
>>>>>> to be
>>>>>> "TRUE" but at the target location, I did not see any link.
>>>>>>
>>>>>> Not sure I am missing anything more.. Hope it's nothing to do with
>>>>>> administrator accounts and administrator rights... Is it something I
>>>>>> should check with my system administrator?
>>>>>>
>>>>>
>>>>> You may need to update your R: although the posting guide asked you to
>>>>> do that before posting.  There was a relevant bug fix in 2.15.3.
>>>>>
>>>>>
>>>>>> Thanks,
>>>>>> Santosh
>>>>>>
>>>>>>
>>>>>> On Thu, May 2, 2013 at 12:22 PM, Prof Brian Ripley
>>>>>> <ripley at stats.ox.ac.uk <mailto:ripley at stats.ox.ac.uk>**> wrote:
>>>>>>
>>>>>>      On 02/05/2013 19:50, Santosh wrote:
>>>>>>
>>>>>>          Dear Rxperts..
>>>>>>          Got a couple of quick q's..
>>>>>>          I am using R in windows environment (both 32-bit and 64-bit)
>>>>>>          a) Is there a way to create symbolic links to some data
>>>>>> files?
>>>>>>
>>>>>>
>>>>>>      See ?file.symlink.  ??'symbolic link' should have got you there.
>>>>>>
>>>>>>      Note that this is not very useful for files, but that is a
>>>>>> Windows
>>>>>>      and not an R restriction.
>>>>>>
>>>>>>
>>>>>>       > b) How do I read data from symbolic links?
>>>>>>
>>>>>>      The same ways you read data from files.
>>>>>>
>>>>>>
>>>>>>          Thanks so much..
>>>>>>          Santosh
>>>>>>
>>>>>>
>>>>>>
>>>>>>      --
>>>>>>      Brian D. Ripley, ripley at stats.ox.ac.uk <mailto:
>>>>>> ripley at stats.ox.ac.uk>
>>>>>>      Professor of Applied Statistics,
>>>>>>
>>>>>> http://www.stats.ox.ac.uk/~__**ripley/<http://www.stats.ox.ac.uk/~__ripley/>
>>>>>>
>>>>>>
>>>>>>
>>>>>> <http://www.stats.ox.ac.uk/~**ripley/<http://www.stats.ox.ac.uk/~ripley/>
>>>>>>
>>>>>>>
>>>>>>      University of Oxford,             Tel: +44 1865 272861
>>>>>>      <tel:%2B44%201865%20272861> (self)
>>>>>>      1 South Parks Road, +44 1865 272866 <tel:%2B44%201865%20272866>
>>>>>> (PA)
>>>>>>
>>>>>>      Oxford OX1 3TG, UK                Fax: +44 1865 272595
>>>>>>      <tel:%2B44%201865%20272595>
>>>>>>
>>>>>>      ______________________________**__________________
>>>>>>      R-help at r-project.org <mailto:R-help at r-project.org> mailing list
>>>>>>
>>>>>> https://stat.ethz.ch/mailman/_**_listinfo/r-help<https://stat.ethz.ch/mailman/__listinfo/r-help>
>>>>>>
>>>>>>
>>>>>>
>>>>>> <https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
>>>>>>
>>>>>>>
>>>>>>      PLEASE do read the posting guide
>>>>>>
>>>>>> http://www.R-project.org/__**posting-guide.html<http://www.R-project.org/__posting-guide.html>
>>>>>>
>>>>>>
>>>>>>
>>>>>> <http://www.R-project.org/**posting-guide.html<http://www.R-project.org/posting-guide.html>
>>>>>>
>>>>>>>
>>>>>>      and provide commented, minimal, self-contained, reproducible
>>>>>> code.
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> Brian D. Ripley,                  ripley at stats.ox.ac.uk
>>>>> Professor of Applied Statistics,
>>>>> http://www.stats.ox.ac.uk/~**ripley/<http://www.stats.ox.ac.uk/~ripley/>
>>>>>
>>>>> University of Oxford,             Tel:  +44 1865 272861 (self)
>>>>> 1 South Parks Road,                     +44 1865 272866 (PA)
>>>>> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>>>>>
>>>>
>>>>
>>>
>>
>>     [[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.
>>



More information about the R-help mailing list