标签: windows perl file copy
假设当前运行的perl .exe是C:\1\ABC.exe。我想仅使用Perl脚本在另一个目录中复制ABC.exe本身,例如将文件ABC.exe复制到C:\2\。最好的方法是什么?
C:\1\ABC.exe
ABC.exe
C:\2\
答案 0 :(得分:3)
这是一种非常奇怪的方式,询问如何在Perl中复制文件?
use File::Copy qw( copy ); copy("C:\\1\\ABC.exe", "C:\\2") or die("Copy failed: $!\n)";
File::Copy