Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing files across a network

Status
Not open for further replies.

audiopro

Programmer
Apr 1, 2004
3,165
GB
I need to access some files across a network on another machine.
Should it be possible to read them via a mapped drive, assuming permissions don't get in the way or am I barking up the wrong tree.
I have tried this simple solution but with no success and it is getting late in the day so will carry on tomorrow.
Code:
	my ($bfile,$dir);

# U is the mapped drive letter
	$dir='U:\\';

	opendir DIR, $dir or die;
	while ($bfile = readdir DIR) {
		print "$bfile<br>";
	}

Keith
 
It would appear that I was over thinking it as the simple answer was to the UNC path instead of the mapped drive letter.
Simple really but only obvious after much searching

Code:
	my ($bfile,$dir);
	$dir="\\\\ourstuff/Volume_1";
	opendir DIR, $dir or print "Cannot access $dir";
	while ($bfile = readdir DIR) {
		print "$bfile<br>";
	}

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top