You can do it anywhere you want to reference it. For example:
If the number of character in %TextVariable% > 10, move file to long, else move file to short would be:
If %TextVariable.Length% > 10
Move file to %LongFolder%
Else
Move file to %ShortFolder%
End