473,396 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

get folder name

160 100+
hi
i have a folder name themes. i want to get all folders within this folder. can i do this
Jan 16 '09 #1
3 1745
Atli
5,058 Expert 4TB
Hi.

Sure you can.
Check out the scandir and is_dir functions.
They should provide you with what you need to do this.
Jan 16 '09 #2
waqasahmed996
160 100+
thanks for providing solution

there is another way is

Expand|Select|Wrap|Line Numbers
  1. $handle = opendir('../themes');
  2.  while (false !== ($file = readdir($handle))) {
  3.         echo $file;
  4.         echo "<br>";
  5.     } 
Jan 16 '09 #3
Atli
5,058 Expert 4TB
That would work to, but keep in mind that the readdir() function also returns files.
If you only want directories, you would want to use the is_dir() function to make sure that the file returned by readdir() is in fact a directory.
Jan 16 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: jenny | last post by:
Hi, I am trying to find a VB way that would create a folder on all existing drives - the folder name would be the same on each drive. ie c:\backup, d:\backup, etc. But the folders would only be...
3
by: Rob Meade | last post by:
Hi all, I am allowing a user to create a directory within my application. I have them entering the name for the directory in a form. When the form is processed I initially check for any...
4
by: Jorntk | last post by:
I have css in a folder name css. so how can this .css file read a pics file from another folder eg, pics/a.jpg. Both css folder and pics folder are located in a folder named project. I know i...
0
by: John H. | last post by:
In effort to understand (Outlook) MAPI folder tree structure wrote simple linear code below to navigate tree. Successive "...Folders.GetNext()"'s return same folder at all levels of tree. What...
1
by: trialproduct2004 | last post by:
Hi all I am having one application where i want to implement new feature that is 'create new folder'. and display new folder name in listview. My listview is editable. My problem is i want to...
0
by: bkandor | last post by:
Very frustrating problem with domain pointers. My hoster is Netfirms. First of all the .htaccess file is not supported at netfirms - if it is present you will receive a 500 server error. ...
0
by: Alex | last post by:
Hi, I made a deployment package that needs to install its files to a folder which name contains a single quote (it's in french). I changed the Application folder's default location to point to...
2
by: biganthony via AccessMonster.com | last post by:
I have inherited a small DB in my office and was wondering if someone could provide some advice. Currently the DB allows the office manager to archive the data for each year under the DB's program...
0
parshupooja
by: parshupooja | last post by:
Contact Reply 1 point Member propoo Joined on 08-31-2007, 10:32 PM Posts 3 Hey all ,
9
by: Keith G Hicks | last post by:
I'm having a lot of trouble with "file in use" errors in my "folder watcher" project. Starting and stopping the watcher and reading my XML file work fine. Once the watcher is started, I'm reading...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.