rename () makes files disappear on Win32 network drive? 
Author Message
 rename () makes files disappear on Win32 network drive?

I am trying to change a bunch of files from uppercase to lowercase.
Using the rename function on my local workstation on both an NTFS
drive and a FAT partition produce the expected rename results.
However, when I run the script on a network drive, the files disappear
(and the server just crashed, but I won't say anything if you don't).
I use the cop-out system ("rename $oldname $newname"); and it works
fine.


by Andrew Fry

use strict;

use File::Find;

my $newname;

my $fullname;





sub renamedf {

  $fullname = $File::Find::name;

  # does name contain any uppercase character ?

  if ($_ =~ /[A-Z]/)

  {

    $newname = $_;

    $newname =~ tr/A-Z/a-z/;

    if (-f $_)

    {

    print "File $fullname: renaming as $newname\n";
    rename($_,$newname);

    }

    if (-d $_)

    {

      print "Directory $fullname: renaming as $newname\n";
      rename($_,$newname);

    }

  }

Quote:
}



Tue, 02 Oct 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. win32 ExitProcess makes stdout disappear

2. renaming a file makes it 0 bytes

3. Closing network program when other end disappears

4. Making keys disappear

5. Making widgets appear and disappear at runtime

6. Copying files from one drive to another drive

7. Copying files from one drive to another drive

8. Reading a networked drive

9. NT Script, Accessing network drives under scheduler

10. win32: accessing file in same Drive where cgi-bin reside return different result

11. Perl, IIS, writing to network drives

12. perl, NT, IIS, can't get script to use network drive

 

 
Powered by phpBB® Forum Software