Show a sorted directory on a network share 
Author Message
 Show a sorted directory on a network share

Hey all,

I am actually looking for a solution to provide a function on our
intranet. I have had a request from a department to have an online
listing of notices, dynamically updateable and sortable on date
modified.

If the files are located on a network share, then I would think it
would be possible to have a script update a frame in a page, sorting
the files, and making them into hyperlinks for the users to open. Once
this is working, it would just be a matter of the authors dropping the
document they want displayed in the network folder, and the next
refresh will show it.

This is essentially the way that I would want it to work, reducing the
need for anybody to step in and modify links etc.

Is this possible to do in perl?

Mark



Tue, 03 Aug 2004 11:13:47 GMT  
 Show a sorted directory on a network share

Quote:
> I am actually looking for a solution to provide a function on our
> intranet. I have had a request from a department to have an online
> listing of notices, dynamically updateable and sortable on date
> modified.

> If the files are located on a network share, then I would think it
> would be possible to have a script update a frame in a page, sorting
> the files, and making them into hyperlinks for the users to open. Once
> this is working, it would just be a matter of the authors dropping the
> document they want displayed in the network folder, and the next
> refresh will show it.

Rather simple.
To get the list of files just use "File::Find".
In the 'wanted()' function use 'push' to collect the full path (not just the
file name!) of every file in an array (if you want to sort by date you may
want to either include the date or use a hash filename -> date), then sort
the array (in case you are using a hash just sort by the value), and then
print it with some syntactic HTML sugar.

Of course this assumes that you are running a web server which can call this
script on demand. Otherwise the user will have to run the script first
before opening (or refreshing) the generated HTML page.

jue



Wed, 04 Aug 2004 00:37:17 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Opening win9x network shares

2. Retrieving Network Shares

3. Win32 network shared folders

4. How to assign a network share in Perl

5. Creating a network share with Win32

6. Perl Script to Show Directory Contents

7. directory contents showing up ?!?

8. Perl Script to Show Directory Contents

9. SOURCE: cronsort - Show crontab entries sorted by class and/or time

10. Creating Network Directories?

11. Access to a shared directory with perl?

12. NT4 WIN32::*** modify rights of a directory or share

 

 
Powered by phpBB® Forum Software