in reply to finding odd characters in a string that I am creating in the script

Why are you reading a list of file names from an "rtf" file? I would assume that this text-processing-based file format is not really suitable as input to the kind of procedure you're trying to set up here, because the file is likely to contain a strange assortment of formatting directives in addition to the data you actually need.

It would be much better if you can supply an unadorned plain-text "flat list" (e.g. as produced by the unix/linux "ls" or "find" utilities), or better yet, use opendir and readdir (or File::Find) to pull file names directly from the source folder(s) where your pdf files are stored.

As it is, the OP code is being pretty promiscuous about the accepting the contents of "ad_archive.rtf", and assuming that all those ".*" patterns in the regexes will yield sensible matches. I would expect a lot of failures.

  • Comment on Re: finding odd characters in a string that I am creating in the script

Replies are listed 'Best First'.
Re^2: finding odd characters in a string that I am creating in the script
by Marshall (Canon) on Jul 28, 2009 at 09:52 UTC
    I was helping the OP in CB and we just lost contact for some reason. The first issue was: what do you want to do? And that appeared to be move all .pdf files in one directory to another directory. One issue was "moving" files between file system mount points (which is a copy and delete). We never got to this .rtf file point. But that would have been the next question: how do you get this list of files to move and to where?

    So I second your question.