473,326 Members | 2,588 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,326 software developers and data experts.

File System Mangement

Hello.. I am trying to make a filesystem management script.
I want to display a list of files and directories and be able to delete them
from this list....
I made a search on the net and there are loads of them but I am trying to do
something much more simple.

At the moment I can display everything within a folder but if I click on a
directory it won't go into the directory, listing all contents ... it is
just a link.

Does anyone know any Tutorial page or if there is any function for
directories navigation ?

Jul 17 '05 #1
4 1670
On Thu, 30 Jun 2005 12:53:20 +0000, Angelos wrote:
Hello.. I am trying to make a filesystem management script. I want to
display a list of files and directories and be able to delete them from
this list....
I made a search on the net and there are loads of them but I am trying to
do something much more simple.

At the moment I can display everything within a folder but if I click on a
directory it won't go into the directory, listing all contents ... it is
just a link.

Does anyone know any Tutorial page or if there is any function for
directories navigation ?


You mean the

bool chdir(path);

function.

Example from the manual,

// current directory
echo getcwd() . "\n";

chdir('public_html');

// current directory
echo getcwd() . "\n";
But that isn't what you want to know really. What you really want to know
for your application is how to collect directories and files, you don't
need to change directory to collect those.

Three methods,

The first is preferred for speed when collection has to be at the time
your code is ran. It collects as needed. So as your code looks in each
directory it collects the file information you want, acts on it in what
ever way your application needs, but goes no further until it is told, as
in browsing say or triggered from code, but not a continuous collection
process.
The second, and worst of the three, is a full collection process at the
time your code is ran. Try that on your ISP's site and they are likely to
send the boys round to see you.

Last, if you do need a full system tree/file list then consider doing this
outside of your script. A cron job in c/c++/perl ... You could have it as
a plain text file of directories that your code can use, or have it update
a MySQL database. Then it's all available for use in a similar way to
'locate' database.

The way I see it, if you have an overnight script going to all the trouble
of collecting dirs/files then it might as well pick out other information
ready for quick use in utility code, to save having it go and look at the
file itself, if your application allows.

So a suggestion for fields might be,

ID
dirpath - Directory path
filename - file name
type - File type
size - file size
created - created date
accessed - accessed date
owner - Owner
backupname - I used a name modifier for versions of documents. In my case
I make use of the year-week number - week day information of the time it
was last changed.

Jul 17 '05 #2
>> Does anyone know any Tutorial page or if there is any function for
directories navigation ?


You mean the

bool chdir(path);

function.


I don't know if that will help, but anyway thanks for your reply...

I'll have a look at these in a bit ;-)
Thanks a lot
Jul 17 '05 #3
Hi!
Hello.. I am trying to make a filesystem management script.
I want to display a list of files and directories and be able to delete them
from this list....
I made a search on the net and there are loads of them but I am trying to do
something much more simple.

At the moment I can display everything within a folder but if I click on a
directory it won't go into the directory, listing all contents ... it is
just a link.


I found such a script on my HD, here it is:
http://nopaste.php-q.net/144412

HTH
Hero Wanders
Jul 17 '05 #4
> I found such a script on my HD, here it is:
http://nopaste.php-q.net/144412


man this script is great ... know the only thing I have to do is some how to
restrict access to all directories except the specified....
It shouldn't be difficult... ;-)
Thanks again !!!
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: serge calderara | last post by:
dear all, I have problem accessing section group in my configuration application file. I got an error saying thta I can have only one section ???? here is my application configuration looks...
10
by: Rafa³ | last post by:
Hi. Timer in C# not work, Thread + Loop + Sleep + DateTime.Now too not work (Process.Prioritet = RealTime) What i do wrong? Best regards. Rafal
2
by: DAMAR | last post by:
I need help to System.Mangement namespace. MSDN documentation is not exhaustive:(. f.e hwere is written how to correctly put WqlEventQuery.EventClassName? How should I bbuild that string? I just...
13
by: Sky Sigal | last post by:
I have created an IHttpHandler that waits for uploads as attachments for a webmail interface, and saves it to a directory that is defined in config.xml. My question is the following: assuming...
4
by: HandersonVA | last post by:
compare to ms sql 2000, the newer version seems to be slow when i try to open or modify a table. is this a demerit of the newer vesion or my machine problem?
6
by: Peter.H.M.Brooks | last post by:
I'm looking for a good (ideally free), system for quite a big writing job. There will be some collaboration, but it is mainly on one system. I am keen to have easy to use indexing and...
10
by: Cain | last post by:
Is making your own content mangement system a good idea?
4
by: Mikael Syska | last post by:
Hey, I have a site in asp.net ... and want to place some add's ... just wonddered if there were any premade admin system's for that? with a mssql backend ... Been searching google and I can't...
4
by: Tamer Ibrahim | last post by:
Hi, I want to create a news mangement system in my web site using c# as a frontend and sql server 2005 as a back end. The news system should be able to allow me adding and editing my news that...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.