in reply to Re^3: Can I use Perl to move an entire HTML file on a different server?
in thread Can I use Perl to move an entire HTML file on a different server?

Thanks that almost works!

I'm getting permission denied now

This is my code now:

my $machine = 'ybslint01'; my $sharename1 = 'wwwdev'; my $sharename2 = 'wwwybs'; my $source = "\\\\$machine\\$sharename1\\streams\\$Config{'Author'}\\$ +Config{'Ref'}"; my $target = "\\\\$machine\\$sharename2\\ybsone\\pipeline\\master\\13A +pr\\$Config{'Ref'}"; rename $source, $target or die "Couldn't move '$source' to '$target' : $!";
It's giving permission denied on the 'rename' bit. What accesses levels do I need to give to what?

This is the error:

Software error: Couldn't move '\\ybslint01\wwwdev\streams\5110\1144336035.htm' to '\\y +bslint01\wwwybs\ybsone\pipeline\master\13Apr\1144336035.htm' : Permis +sion denied at E:\Perlcgi\Pipeline\approve.pl line 189.

Replies are listed 'Best First'.
Re^4: Can I use Perl to move an entire HTML file on a different server?
by nimdokk (Vicar) on Apr 13, 2006 at 16:31 UTC
    Are you sure that you have share level and NTFS permissions on $sharename1 and $sharename2? That's probably where the error is. You might have to check with an Admin to ensure that the user running the script has the appropriate access to browse to the UNC (Windows browsing through Explorer, not browsing with IE, they are two different animals).
      I'm pretty sure that the permissions are OK.

      If I try and map the address given (in Explorer) it says it can't find it, so that leads me to think that the address isn't formed properly in some way.

        You might want to check with an Admin to see how IIS (assuming that's the web server you are using) is configured and where the documents are really located on the server. Chances are there is a setting in IIS for the HTML Root and your files are somewhere below that. The location is something that will be configured when the web service is set up. Not sure if that makes sense, but I'd recommend talking with an Admin to give you a hand with what you need to do. Whether you are using IIS or some other webserver, the set up will be very similar. Hope that helps.