in the Start/Run dialog. It should open an Explorer directory window.
Of course you may not have the rights to access that directory, which
would definitely mean you can't access it in Perl.
Does your opendir() call fail? If so, what is the error message
provided by $! or $?.
The Win32::NetResource module may allow you to connect to the
directory as a drive and then delete the files.
I searched the group archive for "NetResource" and found a few posts
about using this module but none seem to say what definitely works.
Have you tried your code in a command prompt?
--- In perl-beginner@y..., "Christopher L. Severson" <cseverson@m...>
> Sorry for the what seems like constant questions - I am starting to
> frustrated around this.
> I am writing a program that gets a list of all NT Workstation
> the PDC, and then will delete the contents of
> C:\temp and D:\temp on each machine.
> Part of having to do this is either going to be using the 'unlink'
> or the 'opendir' command on a UNC path.
> This is where I am running into troubles. Even if I go in to test
> a variable up to a UNC path (which works, I can print the variable
> it) I cannot then use that variable in my 'opendir' command. Here
> I am trying:
> @filelist = ();
> $path1 = "\\\\hak-comproom\\D\$\\Temp";
> opendir (Temp, "$path1") || die "Cannot open the temp directory:
> @filelist = readdir Temp;
> closedir (Temp);
> Everytime I run this part of the code, it cannot open the temp
> However if I just print the $path1 variable, it prints out just
> Any help/insight to this problem would be greatly appreciated. I am
> ActiveState's Perl v.5.6.0 build 615.
> -Chris Severson