peterto
Programmer
- Apr 23, 2007
- 4
Hi guys ,
I have doubt regarding opening directory on remote machine.....
From my local system i want to open remote system directory and i want to read the contents from that directory i used this bit of code for that,it is giving fail to read ........ but this code is working in local system can any one tell me the reason..please......
/*code for opening dir in local system*/**WORKING****/
$mydir = "C:\\Perl1\\bin\\testscripts\\kiranlearningexample";
if(opendir(DIR, $mydir)==0) {
print "fail to read\n";
}
@allfiles = readdir(DIR);
closedir(DIR);
print @allfiles;
/*code for opening dir in remote system*/**NOTWORKING****/
$mydir = "http:\\vss-srv\\Perl\\testscripts"; i tried this one also ($mydir = " if(opendir(DIR, $mydir)==0) {
print "fail to read\n";
}
@allfiles = readdir(DIR);
closedir(DIR);
print @allfiles;
Thanks.
I have doubt regarding opening directory on remote machine.....
From my local system i want to open remote system directory and i want to read the contents from that directory i used this bit of code for that,it is giving fail to read ........ but this code is working in local system can any one tell me the reason..please......
/*code for opening dir in local system*/**WORKING****/
$mydir = "C:\\Perl1\\bin\\testscripts\\kiranlearningexample";
if(opendir(DIR, $mydir)==0) {
print "fail to read\n";
}
@allfiles = readdir(DIR);
closedir(DIR);
print @allfiles;
/*code for opening dir in remote system*/**NOTWORKING****/
$mydir = "http:\\vss-srv\\Perl\\testscripts"; i tried this one also ($mydir = " if(opendir(DIR, $mydir)==0) {
print "fail to read\n";
}
@allfiles = readdir(DIR);
closedir(DIR);
print @allfiles;
Thanks.