Iterating though a folder path in GoAnywhere
We tend to think as collections being vertical things that we can loop through - a list of names or files etc. However, you could also consider a folder path as a collections too, and may want to act on every folder in the path. This could be because you need to create the actual folders before performing a move operation (which would fail if the folder structure did not yet exist).
Luckily, it is quite straightforward to iterate through a folder path in this way by using a ‘Do-While’ loop. The logic that you need is simply this:

Start by setting a variable, in this example I have called the variable ‘path’ and it contains the value ‘\abc\def\ghi\’. I am relying on the leading and trailing slash for correctly parsing the path, so it may be necessary to add them if they are missing.
Before entering the loop I am creating a second variable called temppath which will have the same value as path - I don't want to change the path variable value.
The Do-While loop requires a condition - it is simply this:
${PositionOf(temppath, '\',2)<>-1}
This basically says to keep looping as long as the temppath variable contains the backslash character.
Now that the loop starts, we get the first folder in the path by using a substring

The substring starts AFTER the leading slash and ends immediately before the subsequent slash (using ‘positionof’ to locate the slash)
You can then work with the folder - creating it or whatever else you need to do (here it is just a print)
Finally, we update the temppath variable by again creating a substring, starting AFTER the leading slah, but running until the end of the existing string.

This is the resulting log:
