Skip to content
Back to formatted view

Raw Message

Message-ID: <OF095552C2.E14D7AA9-ON86256FF2.0070A797-86256FF2.0073F7E7@fd9ns01.okladot.state.ok.us>
Date: 2005-04-29T21:07:48Z
From: khobson@fd9ns01.okladot.state.ok.us
Subject: Windows List of Folders?

For windows, how can I list only the folders in some folder?
I was thinking that dir() and file.info() with isdir==TRUE being something
that might work.

These folders or directories are numerically named with no dot extension
names or other characters.  Typically, these are 3132, 3334, ...

Here is what I tried.  The last line is where I need more work.

pData="C:/Myfiles/R/Data/"
setwd (pData)
x <- dir(pData, all.files=F)
y <- file.info(x, x$isdir==T)

TIA

Kenneth Ray Hobson, P.E.
Oklahoma DOT - QA & IAS Manager
200 N.E. 21st Street
Oklahoma City, OK  73105-3204