1
如何将网络共享文件夹中文件的属性更改为隐藏。
这是如何与Perl可能?如何用perl更改网络共享文件夹中文件的属性?
如何将网络共享文件夹中文件的属性更改为隐藏。
这是如何与Perl可能?如何用perl更改网络共享文件夹中文件的属性?
use Win32::File qw(GetAttributes SetAttributes);
my $qfn = "\\\\server\\share\\dir\\file";
# or: "//server/share/dir/file"
GetAttributes($qfn, my $attrs) or die $^E;
$attrs |= Win32::File::HIDDEN;
SetAttributes($qfn, $attrs) or die $^E;
注:
$^E
应提供错误的错误消息。
你使用哪个操作系统? –