Renameitem: invalid characters

Discuss and share scripts and script files...
Post Reply
LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Renameitem: invalid characters

Post 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?
To see the attached files, you need to log into the forum.

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: Renameitem: invalid characters

Post 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??

admin
Site Admin
Posts: 66249
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Renameitem: invalid characters

Post by admin »

I'd suggest reading the Help file... :wink:

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: Renameitem: invalid characters

Post 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...

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: Renameitem: invalid characters

Post 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
.

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: Renameitem: invalid characters

Post by LittleBiG »

I'm begging to somebody :cry: 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.

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: Renameitem: invalid characters

Post by LittleBiG »

Thanks Stefan, I felt really stupid so far. I have been reading the help file almost an hour...

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: Renameitem: invalid characters

Post 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.

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: Renameitem: invalid characters

Post 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...

admin
Site Admin
Posts: 66249
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Renameitem: invalid characters

Post 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...
:oops: 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).

Post Reply