Handling File-Names Containing Space

There is no definitive solution in pure ARexx for this short of using some external library. One thing that can be done would be to:

  • Get all files separated by a reserved character (for example *) instead of space using the Get Directory Opus 4 functions.
  • Replace all the spaces with a different reserved character (for example /) using Translate.
  • Replace all the first reserved character (*) with spaces.

Given an input string: This is*a*test (meaning the files This is, a and test), the former will result in: This/is a test which can then be handled by the ARexx Word family of functions. In short:

GetAll '*'
AllItems = RESULT
AllItems = Translate(Translate(AllItems, '/', ' '), ' ', '*')

Then, when processing a word, for example with SubWord you have to translate the second reserved character / back to space using Translate:

FileName = Translate(AllItems, ' ', '/')

fuss/amiga/directoryopus/4.txt ยท Last modified: 2022/04/19 08:28 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.