473,703 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1692
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_h tml');

// 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
2761
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 like: ================================================ <?xml version="1.0" encoding="utf-8" ?>
10
2550
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
547
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 looked on MSDN, but nothing's there....
13
4309
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 that this is suppossed to end up as a component for others to use, and therefore I do NOT have access to their global.cs::Session_End() how do I cleanup files that were uploaded -- but obviously left stranded when the users aborted/gave up writting...
4
2063
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
2046
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 cross-referencing as well as excellent backup and recovery of data. I've looked at a few wiki systems and they seem quite good, but don't support all that much formatting. I know things must have changed a lot in the last couple of years since I last...
10
1525
by: Cain | last post by:
Is making your own content mangement system a good idea?
4
1288
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 find any thing ... thanks in advance ...
4
2208
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 would be stored in the site databse and it should be displayed for users automatically on my home page.I have no questions. I just need any resources that can get me close to this scenario. Thanks in advance.
0
8756
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8667
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9117
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9014
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8961
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6585
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5922
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4687
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2063
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.