473,785 Members | 2,283 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6988
Le 02/01/2004, 3A Web Hosting a écrit dans le message
<3F************ ***@3awebhostin g.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**@3awebhost ing.co.uk> napisal w wiadomosci
news:3F******** *******@3awebho sting.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**@3awebhost ing.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.ev il.ones.will.bo w-down-to.us
(put "Hey!" in the Subject line for priority processing!)
-- http://www.pixelsaredead.com
Jul 17 '05 #9
"3A Web Hosting" <in**@3awebhost ing.co.uk> wrote in message
news:3F******** *******@3awebho sting.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

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

Similar topics

3
19403
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 OpenOffice. I know in *nix I can start by using "/" as the file name and doing a recursive listing of the file system from there. (Yes -- I know about permissions to read directories -- that's another issue I've already solved.) How do I find the...
2
1872
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 local hard drive. I figured this should be easily handled in Python, and broadly speaking it is, but I am having a little difficulty. You see, in order to handle the synchronise correctly, I need to be able to determine what is on the FTP server...
18
3503
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 of how to writing code in order to catch and complete directory structure of a partition with out using windows API i mean only assembly and C or C++. Shakeel
5
2486
by: Michael C | last post by:
....on a remote machine? Thanks, Michael C.
4
1895
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). I'm faced with having to do this without knowing where this PDF cache location is. It may be on the local drive, or it may be on a network share. What I'd like to do is have the client add a Virtual Directory in IIS under the project web directory...
5
2270
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:/ drive if it doesn't exist. Any help would be appreciated.
5
14992
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 and why I have to do it. Hopefully someone has a suggestion... Alright, so I'm using a gps-simulation program that outputs gps data, like longitude, lattitude, altitude, etc. (hundreds of terms, these are just the well known ones). In the newer...
16
15569
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 faster, so I'd like to try creating multiple threads, and having them load different chunks of the file at the same time and process it asynchronously. Is it possible to do something like that, and if so, what would be needed to do so?
28
2113
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 behavior when it comes to the Release varsion when I renamed its project directory name it was in! I tracked the problem down to it being the NAME of the DIRECTORY the application is in! Let me explain. I compiled the code, and it worked in ALL...
0
9646
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
9483
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
10346
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10157
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...
0
8982
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7504
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
6742
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
5386
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4055
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.