Page 1 of 1
Renameitem: invalid characters
Posted: 04 May 2011 21:46
by LittleBiG
I'm trying renameitem function, but when I use absolute path, I get this error message: the new name contains invalid characters. What is the problem with this simple expression?
Re: Renameitem: invalid characters
Posted: 12 May 2011 16:24
by LittleBiG
Am I in the right section and I don't know what absolute path is, or is this a bug and I should have put into the bug section??
Re: Renameitem: invalid characters
Posted: 12 May 2011 16:39
by admin
I'd suggest reading the Help file...

Re: Renameitem: invalid characters
Posted: 12 May 2011 21:56
by LittleBiG
I really did. Not once, but more times. Then I gave up and used normal rename function instead (when you developed "curitemprev base"). But I'm starting again, because it seems I'm mindless...
Re: Renameitem: invalid characters
Posted: 12 May 2011 22:41
by Stefan
I too understood the help that i could use an new absolute path
because i read:
Code: Select all
renameitem(newname, [sourceitem=<curitem>], [flags=0], [numsuffix])
newname The new name.
* Absolute
* or relative to current list path.
Like:
select "C:\Work\import.doc"
renameitem("X:\Backup\import.doc");
But it didn't works like that.
9.90.0703
.
Re: Renameitem: invalid characters
Posted: 12 May 2011 22:47
by LittleBiG
I'm begging to somebody

The help says:
Syntax
renameitem(newname, [sourceitem=<curitem>], [flags=0], [numsuffix])
newname The new name.
Absolute or relative to current list path.
Should I have to change backslash to something? I cannot find. There is an example with clipboard. That doesn't work as well, when an absolute path is on the clipboard.
Re: Renameitem: invalid characters
Posted: 12 May 2011 22:50
by LittleBiG
Thanks Stefan, I felt really stupid so far. I have been reading the help file almost an hour...
Re: Renameitem: invalid characters
Posted: 13 May 2011 05:50
by serendipity
I am not sure if "renameitem" will do what you are trying here. From what i read in help, i think renameitem will simply rename selected item or another item not visible in the list.
If you are trying to rename an item and copy it to another place, try command copyas instead.
Re: Renameitem: invalid characters
Posted: 13 May 2011 07:49
by Stefan
Yes serendipity is right:
@LittleBiG, do you need to solve an problem... or do you just try to understand this renameitem() command?
If you want to write an script and don't know how,... just ask, there are many who can help...
Re: Renameitem: invalid characters
Posted: 13 May 2011 08:37
by admin
LittleBiG wrote:I really did. Not once, but more times. Then I gave up and used normal rename function instead (when you developed "curitemprev base"). But I'm starting again, because it seems I'm mindless...

I have to apologize, the Help has a mistake!
The line "Absolute or relative to current list path." belongs to the
second argument (
sourceitem)!
The first argument
newname is just for the
file title (base.extension).