Issues with file.info?

View: New views
6 Messages — Rating Filter:   Alert me  

Issues with file.info?

by Jason Rupert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Are there any tricks associated with file.info?

I just tried it on a directory folder and it returned NA for all fields for all files.  I tried it on a different folder with different files and it still returned NA.  

I tried it on a specific file and it returned all the proper info correctly.

Just wondering if there are any tricks I've overlooked.

______________________________________________
R-help@... 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.

Re: Issues with file.info?

by jholtman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Works fine for me on 2.9.1:

> file.info('/jph')
     size isdir mode               mtime               ctime
    atime exe
/jph    0  TRUE  777 2009-06-29 15:15:13 2008-02-14 09:31:26
2009-07-09 15:57:04  no
>



On Thu, Jul 9, 2009 at 2:02 PM, Jason Rupert<jasonkrupert@...> wrote:

>
> Are there any tricks associated with file.info?
>
> I just tried it on a directory folder and it returned NA for all fields for all files.  I tried it on a different folder with different files and it still returned NA.
>
> I tried it on a specific file and it returned all the proper info correctly.
>
> Just wondering if there are any tricks I've overlooked.
>
> ______________________________________________
> R-help@... 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
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?

______________________________________________
R-help@... 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.

Re: Issues with file.info?

by Rolf Turner-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 10/07/2009, at 6:02 AM, Jason Rupert wrote:

>
> Are there any tricks associated with file.info?
>
> I just tried it on a directory folder and it returned NA for all  
> fields for all files.  I tried it on a different folder with  
> different files and it still returned NA.
>
> I tried it on a specific file and it returned all the proper info  
> correctly.
>
> Just wondering if there are any tricks I've overlooked.

Yes.  You've overlooked the trick of telling us about the specifics of
your operating system, version of R, etc., and of showing exactly what
commands you ``tried'', i.e. of reading the Posting Guide.

        cheers,

                Rolf Turner



######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}

______________________________________________
R-help@... 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.

Parent Message unknown Re: Issues with file.info?

by Jason Rupert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Issue was with an entire directory/folder or list of files in a directory.  It seemed to work fine for a single file or being sent a single file/folder.  

I will try to generate some example code to demonstrate the problem.

Thanks again for all the replies.



--- On Thu, 7/9/09, jim holtman <jholtman@...> wrote:

> From: jim holtman <jholtman@...>
> Subject: Re: [R] Issues with file.info?
> To: "Jason Rupert" <jasonkrupert@...>
> Cc: R-help@...
> Date: Thursday, July 9, 2009, 3:04 PM
> Works fine for me on 2.9.1:
>
> > file.info('/jph')
>      size isdir mode   
>            mtime 
>              ctime
>     atime exe
> /jph    0  TRUE  777 2009-06-29
> 15:15:13 2008-02-14 09:31:26
> 2009-07-09 15:57:04  no
> >
>
>
>
> On Thu, Jul 9, 2009 at 2:02 PM, Jason Rupert<jasonkrupert@...>
> wrote:
> >
> > Are there any tricks associated with file.info?
> >
> > I just tried it on a directory folder and it returned
> NA for all fields for all files.  I tried it on a different
> folder with different files and it still returned NA.
> >
> > I tried it on a specific file and it returned all the
> proper info correctly.
> >
> > Just wondering if there are any tricks I've
> overlooked.
> >
> > ______________________________________________
> > R-help@...
> 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
> Cincinnati, OH
> +1 513 646 9390
>
> What is the problem that you are trying to solve?
>




______________________________________________
R-help@... 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.

Parent Message unknown Re: Issues with file.info?

by Jason Rupert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Yes.  You are right that is the trick:)

Here is what I'm seeing:
input_path<-c("C:/WINDOWS/system32")
file.info(list.files(input_path))


            size isdir mode mtime ctime atime  exe
$winnt$.inf   NA    NA <NA>  <NA>  <NA>  <NA> <NA>
1025   NA    NA <NA>  <NA>  <NA>  <NA> <NA>
...
xsi.jar  NA NA <NA>  <NA> <NA> <NA> <NA>
xsi.zip  NA NA <NA>  <NA> <NA> <NA> <NA>
zipfldr.dll NA NA <NA> <NA> <NA> <NA> <NA>

input_path<-c("C:/WINDOWS/system32/winmine.exe")
file.info(input_path)

                                  size isdir mode               mtime               ctime               atime   exe
C:/WINDOWS/system32/winmine.exe 119808 FALSE  777 2002-12-31 07:00:00 2008-08-15 14:28:37 2009-07-13 09:39:32 win32

Not sure why, file.info is not working for the array of input files/folders/etc. but successfully works when an individual file in input.  

Thanks again for your insights and feedback.



--- On Thu, 7/9/09, Rolf Turner <r.turner@...> wrote:

> From: Rolf Turner <r.turner@...>
> Subject: Re: [R] Issues with file.info?
> To: "Jason Rupert" <jasonkrupert@...>
> Cc: "R-help@..." <R-help@...>
> Date: Thursday, July 9, 2009, 3:13 PM
>
> On 10/07/2009, at 6:02 AM, Jason Rupert wrote:
>
> >
> > Are there any tricks associated with file.info?
> >
> > I just tried it on a directory folder and it returned
> NA for all fields for all files.  I tried it on a
> different folder with different files and it still returned
> NA.
> >
> > I tried it on a specific file and it returned all the
> proper info correctly.
> >
> > Just wondering if there are any tricks I've
> overlooked.
>
> Yes.  You've overlooked the trick of telling us about
> the specifics of
> your operating system, version of R, etc., and of showing
> exactly what
> commands you ``tried'', i.e. of reading the Posting Guide.
>
>     cheers,
>
>         Rolf Turner
>
>
>
> ######################################################################
> Attention:This e-mail message is privileged and
> confidential. If you are not theintended recipient please
> delete the message and notify the sender.Any views or
> opinions presented are solely those of the author.
>
> This e-mail has been scanned and cleared by
> MailMarshalwww.marshalsoftware.com
> ######################################################################
>




______________________________________________
R-help@... 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.

Re: Issues with file.info?

by Duncan Murdoch-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 7/13/2009 10:42 AM, Jason Rupert wrote:

> Yes.  You are right that is the trick:)
>
> Here is what I'm seeing:
> input_path<-c("C:/WINDOWS/system32")
> file.info(list.files(input_path))
>
>
>             size isdir mode mtime ctime atime  exe
> $winnt$.inf   NA    NA <NA>  <NA>  <NA>  <NA> <NA>
> 1025   NA    NA <NA>  <NA>  <NA>  <NA> <NA>
> ...
> xsi.jar  NA NA <NA>  <NA> <NA> <NA> <NA>
> xsi.zip  NA NA <NA>  <NA> <NA> <NA> <NA>
> zipfldr.dll NA NA <NA> <NA> <NA> <NA> <NA>
>
> input_path<-c("C:/WINDOWS/system32/winmine.exe")
> file.info(input_path)
>
>                                   size isdir mode               mtime               ctime               atime   exe
> C:/WINDOWS/system32/winmine.exe 119808 FALSE  777 2002-12-31 07:00:00 2008-08-15 14:28:37 2009-07-13 09:39:32 win32
>
> Not sure why, file.info is not working for the array of input files/folders/etc. but successfully works when an individual file in input.  

Look at what list.files() returns:  there is no path, just the filename.
  If you want to use file.info, you need the full path, so you'd use

file.info(list.files(input_path,full=TRUE))

(That takes a long time, by the way:  there are a lot of files there,
and they all need to be opened for inspection!)

Duncan Murdoch

>
> Thanks again for your insights and feedback.
>
>
>
> --- On Thu, 7/9/09, Rolf Turner <r.turner@...> wrote:
>
>> From: Rolf Turner <r.turner@...>
>> Subject: Re: [R] Issues with file.info?
>> To: "Jason Rupert" <jasonkrupert@...>
>> Cc: "R-help@..." <R-help@...>
>> Date: Thursday, July 9, 2009, 3:13 PM
>>
>> On 10/07/2009, at 6:02 AM, Jason Rupert wrote:
>>
>> >
>> > Are there any tricks associated with file.info?
>> >
>> > I just tried it on a directory folder and it returned
>> NA for all fields for all files.  I tried it on a
>> different folder with different files and it still returned
>> NA.
>> >
>> > I tried it on a specific file and it returned all the
>> proper info correctly.
>> >
>> > Just wondering if there are any tricks I've
>> overlooked.
>>
>> Yes.  You've overlooked the trick of telling us about
>> the specifics of
>> your operating system, version of R, etc., and of showing
>> exactly what
>> commands you ``tried'', i.e. of reading the Posting Guide.
>>
>>     cheers,
>>
>>         Rolf Turner
>>
>>
>>
>> ######################################################################
>> Attention:This e-mail message is privileged and
>> confidential. If you are not theintended recipient please
>> delete the message and notify the sender.Any views or
>> opinions presented are solely those of the author.
>>
>> This e-mail has been scanned and cleared by
>> MailMarshalwww.marshalsoftware.com
>> ######################################################################
>>
>
>
>
>
> ______________________________________________
> R-help@... 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.

______________________________________________
R-help@... 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.