my $f; Opendir($f,"."); my $filename; while ($filename=readdir($f)) { if ($filename=~/\.avi$/) { $filename=~s/([ \[\];$'"()])/\\$1/g; #adds \ before spaces, bracke +ts and other special chars ... } }
Note I do not know how escaping works in windows (where \ is dir separator) or what special chars make problems there. So above probably needs some more refinement to work on both platforms.
In reply to Re^2: Why does this only work correctly as root?
by jethro
in thread Why does this only work correctly as root?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |