473,390 Members | 1,112 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,390 software developers and data experts.

Reading directory of hard drive

Hi Folks

This is probably starring me in the face but how do I read the contents
of a hard drive directory? I've been playing around with the
opendir($dir) sample from php.net and can read from the server without
problem but how can I read a list of files from the hard drive of the PC
(win98 (spit!)) I'm using? Basically what I want to do is read the file
names of a certain directory on the hard drive into an array and then
upload them all onto the server.

--
Colin

3A Web Hosting Team
http://www.3awebhosting.co.uk
Jul 17 '05 #1
10 6949
Le 02/01/2004, 3A Web Hosting a écrit dans le message
<3F***************@3awebhosting.co.uk> :
Hi Folks

This is probably starring me in the face but how do I read the
contents of a hard drive directory? I've been playing around with
the opendir($dir) sample from php.net and can read from the
server without problem but how can I read a list of files from
the hard drive of the PC (win98 (spit!)) I'm using? Basically
what I want to do is read the file names of a certain directory
on the hard drive into an array and then upload them all onto the
server.


Hmm... you want to read the hard disk of the computer
accessing the webpage ?

--
SeeSchloß

Jul 17 '05 #2
Hi
Hmm... you want to read the hard disk of the computer
accessing the webpage ?


Yes. If you had read my question you would know why! It's for the admin
panel of a photo gallery I'm trying to write. All the photos go into a
directory on your hard drive, you log into the control panel, tell it
what directory to look in, it puts all the .jpg files into arrays and
uploads them.

--
Colin

3A Web Hosting Team
http://www.3awebhosting.co.uk
Jul 17 '05 #3
Dans le message <3F**************@3awebhosting.co.uk>,
3A Web Hosting a écrit :
Hi
Hmm... you want to read the hard disk of the computer
accessing the webpage ?


Yes. If you had read my question you would know why! It's for the
admin panel of a photo gallery I'm trying to write. All the
photos go into a directory on your hard drive, you log into the
control panel, tell it what directory to look in, it puts all the
.jpg files into arrays and uploads them.


OK I read it but I thought I was not sure I had understood
correctly. To my knowledge, unless you set up an ftp server
or something like that on your computer, it won't be
possible I think. Not just with PHP at least.

--
SeeSchloß

Jul 17 '05 #4
It's not doable.

Uzytkownik "3A Web Hosting" <in**@3awebhosting.co.uk> napisal w wiadomosci
news:3F***************@3awebhosting.co.uk...
Hi Folks

This is probably starring me in the face but how do I read the contents
of a hard drive directory? I've been playing around with the
opendir($dir) sample from php.net and can read from the server without
problem but how can I read a list of files from the hard drive of the PC
(win98 (spit!)) I'm using? Basically what I want to do is read the file
names of a certain directory on the hard drive into an array and then
upload them all onto the server.

--
Colin

3A Web Hosting Team
http://www.3awebhosting.co.uk

Jul 17 '05 #5
On 2004-01-02, 3A Web Hosting <in**@3awebhosting.co.uk> wrote:
Hi
Hmm... you want to read the hard disk of the computer
accessing the webpage ?


Yes. If you had read my question you would know why! It's for the admin
panel of a photo gallery I'm trying to write. All the photos go into a
directory on your hard drive, you log into the control panel, tell it
what directory to look in, it puts all the .jpg files into arrays and
uploads them.

If you had read the manual, you would have known that PHP is
server-side, and not client-side! Perhaps there is a nice JavaScript out
there that will do what you want (Actually i hope there is no such
thing, because that would allow evil admins to scan my harddisk
contents)

--
verum ipsum factum
Jul 17 '05 #6
Tim Van Wassenhove wrote:
If you had read the manual, you would have known that PHP is
server-side, and not client-side! Perhaps there is a nice JavaScript out
there that will do what you want (Actually i hope there is no such
thing, because that would allow evil admins to scan my harddisk
contents)


Now that is a scary thought!

--
www.eSnider.net
Jul 17 '05 #7
Hi Folks

Well, now that's it's morning and the effects of the cider have worn off
it's pretty obvious that PHP is server side and can't read the clients
hard drive.

I really should stop working earlier in the night!

--
Colin

3A Web Hosting Team
http://www.3awebhosting.co.uk
Jul 17 '05 #8
Regarding this well-known quote, often attributed to 3A Web Hosting's
famous "Thu, 01 Jan 2004 23:56:29 +0000" speech:
Hi Folks

This is probably starring me in the face but how do I read the contents
of a hard drive directory? I've been playing around with the
opendir($dir) sample from php.net and can read from the server without
problem but how can I read a list of files from the hard drive of the PC
(win98 (spit!)) I'm using? Basically what I want to do is read the file
names of a certain directory on the hard drive into an array and then
upload them all onto the server.


You'd probably need some sort of signed-Java applet to do that.

--
-- Rudy Fleminger
-- sp@mmers.and.evil.ones.will.bow-down-to.us
(put "Hey!" in the Subject line for priority processing!)
-- http://www.pixelsaredead.com
Jul 17 '05 #9
"3A Web Hosting" <in**@3awebhosting.co.uk> wrote in message
news:3F***************@3awebhosting.co.uk...
Hi Folks

This is probably starring me in the face but how do I read the contents
of a hard drive directory? I've been playing around with the
opendir($dir) sample from php.net and can read from the server without
problem but how can I read a list of files from the hard drive of the PC
(win98 (spit!)) I'm using? Basically what I want to do is read the file
names of a certain directory on the hard drive into an array and then
upload them all onto the server.

--
Colin

3A Web Hosting Team
http://www.3awebhosting.co.uk


You lost me, I stared at your question for a bit,

are you trying to look at a client side directory, so a client can
upload pics via a web interface?

if this is the case, write an applet, or an activex web componet

--
Mike Bradley
http://www.gzentools.com -- free online php tools
Jul 17 '05 #10
"3A Web Hosting" <in**@3awebhosting.co.uk> wrote in message
news:3F**************@3awebhosting.co.uk...
Hi
Hmm... you want to read the hard disk of the computer
accessing the webpage ?


Yes. If you had read my question you would know why! It's for the admin
panel of a photo gallery I'm trying to write. All the photos go into a
directory on your hard drive, you log into the control panel, tell it
what directory to look in, it puts all the .jpg files into arrays and
uploads them.

--
Colin

3A Web Hosting Team
http://www.3awebhosting.co.uk


try this:

http://www.gzentools.com/test/mfupload.html
it requires that you enable unsigned activex objects,
(I am not going to spend the money to sign a test)

I think something along those lines are what you are looking for.

--
Mike Bradley
http://www.gzentools.com -- free online php tools
Jul 17 '05 #11

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

Similar topics

3
by: Hal Vaughan | last post by:
I've seen install programs that search a hard drive for previous instances of a program, or to find installs of other needed programs. I need to search a hard drive for any installations of...
2
by: Stephen Horne | last post by:
Just recently I decided I want to make use of my ISP freebie webspace. In order to make that easier, I'd like to be able to automatically synchronise an FTP file/folder heirarchy with one on my...
18
by: shakeel-ur-rehman | last post by:
I am wrtiting programm in C++ to read/take complete image of the partiton. can any one let me know the internet resources and web sites having tutorials relating to this and tell any sequence ...
5
by: Michael C | last post by:
....on a remote machine? Thanks, Michael C.
4
by: William Sullivan | last post by:
I have an application that pulls images from a physical drive directory, creates a PDF of the image, caches the image, and returns a link to the client (using ajax, but that's not the problem). ...
5
by: mick.smith1 | last post by:
Hi I can use "Application.CurrentProject.Path & "\Template" to check that a directory exists on a users hard drive. What i am having trouble finding is the code to add a directory to the users C:/...
5
blazedaces
by: blazedaces | last post by:
Ok, so you know my problem, java is running out of memory reading with SAX, the event-based xml parser intended more-so than DOM for extremely large files. I'll try to explain what I've been doing...
16
by: WATYF | last post by:
Hi there... I have a huge text file that needs to be processed. At the moment, I'm loading it into memory in small chunks (x amount of lines) and processing it that way. I'd like the process to be...
28
by: Peter Oliphant | last post by:
I have written a program using MS VS VC++ 2005 Express, /cli pure. Upon compiling it it works fine in the GUI development environment. It also works fine as a Debug stand-alone. ut I had an odd...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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...

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.