I want to move files from a server that my Windows computer is connected to, to the actual computer. I have tried the code on my mac and it works fine, so I suspect the problem has to do with the fact that the files I wish to move are on a server or perhaps with Windows (I am unfamiliar with this OS). It is important to me to be able to use `File::Find::Rule` because there are many subdirectories within subdirectories that need to be searched.

```
use strict;
use warnings;
use File::Find::Rule;
use File::Copy;

# directory where files live
# my $dir = "\\172.18\user\folder\folder2";

# directory where TextGrids will be moved to
my $outdir = "\users\lisa\desktop\test";

my @files;

@files = File::Find::Rule   -> file()
                             -> name("*_clean.TextGrid")
                             -> maxdepth()
                             -> in($dir);

foreach my $file (@files) {
    $file =~ /(.*\\)(.*)/;
    my $name = $2;
    copy("$file", "$outdir/$name") or die "Copy failed: $!";
    }

```

Edit: Ok, I've made some changes to the script below. But the strange thing is, that when I ask it to print each file, it gives me something like `\\172.18\user\folder\folder/255/file.txt`. I changed the regex to be `(.*\/)(.*)` and now the script works perfectly, though I don't know why!

```
use strict;
use warnings;
use File::Find::Rule;
use File::Copy;

# directory where files live
my $dir = "\\\\172.18\\user\\folder\\folder2";

# directory where TextGrids will be moved to
my $outdir = "C:\\Users\\lisa\\desktop\\test";

my @files;

@files = File::Find::Rule   -> file()
                             -> name("*_clean.TextGrid")
                             -> maxdepth()
                             -> in($dir);

foreach my $file (@files) {
    print "$file\n";
    $file =~ /(.*\\)(.*)/;
    my $name = $2;
    copy("$file", "$outdir\\$name") or die "Copy failed: $!";
    }

```