This is pretty close, but there are a couple of changes you'll probably need to make. First, be sure to chomp $line after reading it in. Otherwise it will generally have a newline at the end of it and this will mess up your copy command. Second, UNC paths start with a double backslash (\\), which means that if you want to write one in a double-quoted string in Perl you need to write it with four backslashes (\\\\); your code only has three. Finally, IIRC copy.exe does not support UNC paths on some older versions of Windows. Unfortunately I don't have anything older than XP in front of me to test with. If you run into this problem then you'll need to map the path to 'infoserver' as a network drive.
By the way, File::Copy is now a core module, so if your Perl is recent enough you have it already.
In reply to Re: Copy Database to another location
by Errto
in thread Copy Database to another location
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |