rhoadesjn has asked for the wisdom of the Perl Monks concerning the following question:
I'm a novice with perl so take it easy on me. I'm trying to open a http directory on our network. What command do I use to open a http directory and read all the directories below it? The opendir command does not read http directories.
Our IS department has moved all our documentation that we need for on-call to SharePoint so I can't just copy and paste anymore for a standard directory on the network. Urrggh.
Here is a simple sample of code that I have written (this isn't complete)...
Thanks!
Our IS department has moved all our documentation that we need for on-call to SharePoint so I can't just copy and paste anymore for a standard directory on the network. Urrggh.
Here is a simple sample of code that I have written (this isn't complete)...
#Open the directory opendir (DIR, "http://yoda/Documents/PSG/Customers/") || die ("Unable +to open directory"); #Read list of files in the directory while ($filename = readdir(DIR)) { @files = readdir(DIR); } closedir(DIR); #Remove the file . which represents the current directory shift (@files); #Go through each of the files in the directory foreach $file (@files) { #Open subfolder open (DIR, "http://yoda/Documents/PSG/Customers/$file/Support/sitema +p/") #code here copies each document from subfolder to c:\sitemaps }
Thanks!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Opening a web page directory
by brian_d_foy (Abbot) on Apr 12, 2005 at 22:12 UTC | |
Re: Opening a web page directory
by elwarren (Priest) on Apr 12, 2005 at 23:17 UTC | |
by rhoadesjn (Novice) on Apr 13, 2005 at 14:21 UTC | |
Re: Opening a web page directory
by moot (Chaplain) on Apr 12, 2005 at 21:15 UTC | |
Re: Opening a web page directory
by halley (Prior) on Apr 12, 2005 at 21:21 UTC | |
Re: Opening a web page directory
by ww (Archbishop) on Apr 12, 2005 at 22:06 UTC | |
Re: Opening a web page directory
by sh1tn (Priest) on Apr 12, 2005 at 21:35 UTC |
Back to
Seekers of Perl Wisdom