Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Converting relative path to absolute path

bhauteshved
7 - Meteor

I have a list of relative paths to files in a Text Box and would like to convert them to absolute paths. Any suggestions on how to do this?

2 REPLIES 2
DavidP
17 - Castor
17 - Castor

Hi @bhauteshved 

 

One way would be to use a dynamic input tool to load all the files and choose the option to output fullpath as field name in the template file config of the dynamic input tool.

 

This is assuming that the files all have the same structure.

 

I also played with another idea, which is to turn a directory tool into a batch macro like this:

 

DavidP_0-1596665995309.png

 

I used an example of a relative path such as .\filename.yxmd

 

I then split it into the path (.\) and the filename (filename.yxmd) with a regex tool in the workflow and used one to update the folder path and the other to update the filename filter in the directory tool.

 

The problem with this is that the relative path (.\) is determined by where the macro is saved, not the workflow.

 

At this point I relaised that I probably need some info on these relative paths.

mredissi
6 - Meteoroid

Hello  @bhauteshved ,

Would you be able to share the workflow? I'm interested in learning how you setup the inputs to the directory tool. Thanks

Labels