It all started out as a simple script to rename some files.
Now I can't find my way out!
I have several hundred files that are named like this:
'ENDPNA.PROD.HRBANS(EDIFACT)'
Note that the file name includes single ticks, dots, and parens.
Here's what I've done so far:
while (<*>) {
Rich Fernandez a écrit :
>
> It all started out as a simple script to rename some files.
> Now I can't find my way out!
>
> I have several hundred files that are named like this:
> 'ENDPNA.PROD.HRBANS(EDIFACT)'
>
> Note that the file name includes single ticks, dots, and parens.
>
> Here's wha
On Wed, Oct 31, 2001 at 04:12:03PM -0500, Rich Fernandez wrote:
Rearranged a bit for clarity.
First, your error:
> When I run this script, I get an error that says: A file or directory in
> the path name does not exist.
This means that you tried to do something like:
mv foo bar/foo
where
Thanks for all the responses, but I'm still trying to get this to work.
I put a couple of print statements in and re-ran the script sending
the output to a log: map_rename.pl > map_rename.log 2>&1
Here's the contents of the log file (I'm using only 3 files for testing)...
\'ENDPNA.PROD.HRBANS(ED
FWIW and for other newbies that might care...
I'm not sure why this works, but it does.
If I issue the command:
rename $source, $target or warn "...";
where $source contains my funky file name --> 'ENDPNA.PROD.HRBANS(EDIFACT)'
it _just_works_!
No need to escape anything!!!
I was gett
On Thu, Nov 01, 2001 at 12:28:23PM -0500, Rich Fernandez wrote:
> rename $source, $target or warn "...";
[snip]
> No need to escape anything!!!
>
> I was getting hung up on what/how to escape the special characters
> when apparently this isn't need.
>
> By contrast if you use a mv(1) fro