I have one, load the attached file in dispatch.
When loaded, it will appear as 'Name / Number Match'. If the filename and serial number match already, it will skip the operation. You may want to check the target variable is the same as the one that you use.
Use filename as Serial.acn.zip 614 bytes
I did it similarly to what Stavros posted. I will try to explain in steps what to do in case you don't understand what is happening in the dispatch. Stavros variable steps are less than mine, but I wanted to make sure that I got the real extension if someone had an extra dot in their file name for some reason.
Here is what I did.
- Add a new action to the dispatch admin Actions
- Enter the action information and select for a menu command.
- Create 5 variables:
- TotalLength -- Static String -- Length(%NameOfSelectedFile%)
- DotPosn -- Static String -- ReverseFind(%NameOfSelectedFile%,.)
- ExtLength -- Static String -- Sub(%TotalLength%,%DotPos%)
- NameLength -- Static String -- Sub(%TotalLength%,%ExtLength%)
- FileName -- Static String -- Left(%NameOfSelectedFile%,%NameLength%)
- Create the steps of the command and include one of the commands to set the card variable to FileName.
I thought it was pretty clever that Stavros thought to check if the correct value already existed. That way if you select multiple file and the correct value is already there it does not check the file out and change it to the same thing.
I don't think it is necessary to have a step to get latest version of the file since you are dealing with the file name and are writing to a card variable.
If the variable for the file name is a version free variable you could get around the issues of having to check out and in. If the file happens to be checked out already the dispatch will give you an error. I can't see a reason you would need to know what the file was named at a specific version, but I guess there could be a reason if you want to tell someone that doesn't have vault access what the name was when you sent the file to them a year ago. It might be easier to just send it again.
It would be nice if there was a dispatch option to do something on check in instead of just check out or when a file is added to the vault. In this situation you might have the file checked out when you decide to change the name. Then you would have to remember to right click and run the script.
Thanks alot, it is working as I was asking for.