Re: Rename files using IDL - is it possible? [message #72096 is a reply to message #72010] |
Tue, 10 August 2010 14:46   |
Heinz Stege
Messages: 189 Registered: January 2003
|
Senior Member |
|
|
On Tue, 10 Aug 2010 04:58:21 -0700 (PDT), LNpellen wrote:
> So the message is:
> Don't use IDL for deleting files that have special characters in the
> name.
> Wait for the next release after 8.0 and hope for a better solution?
I think, this question has to be answered by the ITTVIS folks.
In the case, you are sure that a file with the name filename is
existing, you could do the following check:
if n_elements(file_search(filename)) ge 2 then $
message,'Non-unique file specification...'
So you can stop program execution by issuing an error message, instead
of deleting or renaming wrong files.
Another way could be to check a whole directory for critical file
parallelisms:
a=file_search('*')
if n_elements(uniq(a,sort(a))) ne n_elements(a) then $
message,'Ambiguous file access...'
HTH, Heinz
|
|
|