Re: Rename files using IDL - is it possible? [message #72138 is a reply to message #72010] |
Thu, 05 August 2010 23:40   |
LNpellen
Messages: 37 Registered: November 2009
|
Member |
|
|
I'm using IDL 7.1 and Windows XP
Now I've tried spawn and FILE_DELETE and OPENR with /DELETE and
discovered a bit strange behaviour (I think):
The spawn command is either incorrect or not working
IDL> spawn, 'DEL C:\testaaa.txt' (where the aaa is three norwegian A
with a ring)
FILE_DELETE and OPENR with /DELETE is not working if the filename is
defined by dialog_pickfile, but is woring if the filename is defined
with a hard coded string
Not working if a=dialog_pickfile(), working if a='C:
\testaaa.txt' (again a is a ring)
IDL> FILE_DELETE, a, (/NOEXPAND_PATH)
IDL> OPENR, UNIT, a, /DELETE, /GET_LUN & FREE_LUN, UNIT
I.e. if the string is hardcoded (which I certainly cannot do in my
program) the commands except spawn works. I did also try a(0) with
dialog_pickfile to assure it's a string, not an array of strings.
The hard coded A is a copy of the print of A using dialog_pickfile so
I find no difference in A hard coded or A defined by dialog_pickfile.
Now any suggestions?
|
|
|