[PLUG] Mass Removal of White Space in File Names

Richard C. Steffens rsteff at comcast.net
Mon Apr 18 15:54:45 UTC 2011


On 04/18/2011 08:39 AM, Rich Shepard wrote:
> On Mon, 18 Apr 2011, Rogan Creswick wrote:
>
>> - The rename is only applied to one file at a time, regardless of how
>> it may act as a batch job, so there is no guarantee that some
>> intermediate state of your files won't result in conflicts.
>     Since each file name is unique, there should not be an intermediate state.

Following this thread this morning, two thoughts occur:

1) Add some error checking code to test for the "new" file name, to see 
if it already exists, before making the change.

2) Every program I recall using that involves changing a file name 
already does this, which means somebody already wrote this code. Is 
there a function somewhere that could be called? For example, store the 
old file name in a variable, remove the unwanted characters, then submit 
that variable to the function that looks to see if the name is already 
in use.

-- 
Regards,

Dick Steffens





More information about the PLUG mailing list