in reply to Problems with special characters in Linux file names
You use shell_quote where you shouldn't. (And, arguably, you don't use it where you should.)
-e needs a path, not a piece of shell code.
my $src_qfn = 'BulletinV3, 1 Montana 20xx-xx-xx (print).pdf_FN_TEMPLAT +E'; if (-e $src_qfn) { ... } else { ... }
Or with error checking:
my $src_qfn = 'BulletinV3, 1 Montana 20xx-xx-xx (print).pdf_FN_TEMPLAT +E'; if ( stat( $src_qfn ) ) { ... } else { die( "Can't stat `$src_qfn`: $!\n" ) if !$!{ ENOENT }; ... }
As for that message of command at the bottom,
system( "zenity", "--title" => "Rename problem", "--width" => 400, "--error", "--text" => "Can't rename `$src_qfn` to `$dst_qfn`: $!", )
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problems with special characters in Linux file names
by EigenFunctions (Beadle) on Sep 13, 2022 at 15:32 UTC | |
by EigenFunctions (Beadle) on Sep 13, 2022 at 15:47 UTC | |
by Your Mother (Archbishop) on Sep 14, 2022 at 10:45 UTC |