No BSD License  

Highlights from
SUBDIR *new*

5.0

5.0 | 3 ratings Rate this file 28 Downloads (last 30 days) File Size: 1.23 KB File ID: #1492

SUBDIR *new*

by Elmar Tarajan

 

15 Mar 2002 (Updated 07 Dec 2004)

Recursively search for files and/or directorys under given folder without using of global variables.

| Watch this File

File Information
Description

SUBDIR
     returns all subfolder under current path.
  P = SUBDIR('directory_name')
      stores all subfolders under given directory into a variable 'P'

  [P F] = SUBDIR('directory_name')
      stores all subfolders under given directory into a
      variable 'P' and all filenames into a variable 'F'.
      use sort([F{:}]) to get sorted list of all filenames.

Acknowledgements
This submission has inspired the following:
RPCODE
MATLAB release MATLAB 6.5 (R13)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
28 Feb 2007 martin demel

The code is optimized and you can also get the name of the files. This is excellent working.

26 Mar 2008 Durga Shrestha

nice work, save my time.

16 Jul 2009 Yanfei

great work!!!!

Please login to add a comment or rating.
Updates
07 Dec 2004

the output of results in the new version is more user friendly.

Tag Activity for this File
Tag Applied By Date/Time
path Elmar Tarajan 22 Oct 2008 06:43:03
directories Elmar Tarajan 22 Oct 2008 06:43:03
files Elmar Tarajan 22 Oct 2008 06:43:03
subdir Elmar Tarajan 22 Oct 2008 06:43:03
dir Elmar Tarajan 22 Oct 2008 06:43:03
directory Elmar Tarajan 22 Oct 2008 06:43:03
subfolders Elmar Tarajan 22 Oct 2008 06:43:03
subdir Cees-Willem 20 Jan 2012 16:19:20

Contact us at files@mathworks.com