Win32: File Manipulation



I am trying to build a script to move files between a couple of FTP
servers and I need to rename the files before I transfer them to the
second server. I am able to get them to a network directory without any
problems but I am having trouble manipulating the files once there.
Below is the code snipit I am having trouble with. Anyone have some
insight?

while ($nextname = <\\\\serverName\\shareName\\PTL\\PTL*.txt>) {
#strip off .txt extension store for uses after file has been ftped
(for second rename)
print $nextname "\n";
$basename = $nextname;
print $basename " ->";
$basename =~ s#.*/##;
print $basename " ->";
$dnlname = $basename.".dnl";
print $dnlname "\n";
if ($PickFTP->Put($nextname.dnl)){
if ($PickFTP->Rename($nextname.dnl,$nextname)) {
print LOGfile "$thisDay, $thisMonth $mday, $Year, $hour:$min:$sec -
Transfer of $nextname.txt to PTL server sucessful.\n";
}
}
}

Thanks for your responses.

--AJ

.



Relevant Pages

  • Re: can NT4 servers and 2003 server play nicely together?
    ... NT servers and win2k3 servers can both be on the wire at the same time. ... rename the domain name. ... 4.Upgrade the new PDC to Windows Server 2003. ... 325857 How To Expand the Boot Partition During a Windows Server 2003 Upgrade ...
    (microsoft.public.windows.server.migration)
  • RE: From 2000 to 2000
    ... the only way to rename a domain controller in Windows 2000 is to ... demote the server to a member server, rename the server, and then repromote ... To clarify the process, let us name the current DC ComA, and the new DC ... Install AD-integrated DNS on ComB, ...
    (microsoft.public.windows.server.migration)
  • RE: from 2000 to 2003 but not upgrade
    ... Before you take any action to the new server, rename the 2k domain first, ... use the migration process to migrate user accounts etc. ... Meanwhile, you mentioned that you want to keep the original user profiles, ...
    (microsoft.public.windows.server.migration)
  • Re: netdiag /fix DNS_ERROR_RCODE_NOT_IMPLEMENTED error
    ... I don't want to go through the whole procedure of attempting to rename ... Use the DNS MMC snap-in to create the required DNS zones compiled - done ... Server 2003 Server Help and Support Center - done, ... computers that are statically configured for TCP/IP attempt to ...
    (microsoft.public.windows.server.active_directory)
  • Re: Demotion DC
    ... "You can re-install a new server with same name, ... or you can rename a NON-DC and promote it." ... > or you can rename a NON-DC and promote it. ... >> It might possible to have security problems or any SID problem if I try ...
    (microsoft.public.win2000.active_directory)