i trying list files organized following:
/volumes/macintosh hd 2/data/cmip5/historical/ ----clt -----------------------file1.txt -----------------------file2.txt ---------------models -----------------------file1.txt -----------------------file2.txt ----hurs -----------------------file1.txt -----------------------file2.txt ---------------models -----------------------file1.txt -----------------------file2.txt ----precip -----------------------file1.txt -----------------------file2.txt ---------------models -----------------------file1.txt -----------------------file2.txt ----temp -----------------------file1.txt -----------------------file2.txt ---------------models -----------------------file1.txt -----------------------file2.txt ----wind -----------------------file1.txt -----------------------file2.txt ---------------models -----------------------file1.txt -----------------------file2.txt
what list, in 1 single list, files contained in subdirectories "models".
what tried, , did not work, command:
> sys.glob(file.path('/volumes/macintosh hd 2/data/cmip5/historical/', "models","*.txt")) character(0)
is there straighforward way achieve r?
turns out way easier thought:
sys.glob('/volumes/macintosh hd 2/data/cmip5/historical/*/models/*.txt')
it seems impossible find r can not do.
Comments
Post a Comment