This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Is there a tool to dynamically create a new file directory on the hard drive (or network drive); whereby the file directory name would be a field in the incoming data, and the file would be a report coming from the Render tool?
I’ve used the command prompt tool to create directories (MKDIR) but never been able to use dynamic naming.
I use the Run Command tool for this. In a formula tool before the Run Command, I make a field the will be something like this: "MKDIR " + [DirectoryField], I then remove all other fields and feed that into the Run Command tool to make a batch file (Write Source/Output) and run that batch file (Run External Program). You can use Block Until Done to make sure that your folders are created before saving to that directory.
Attached is an example that allows you to enter different folders and requires a full path
Text input that has the path to the folder in a field called "DIR", in my case I entered the field value as D:\mytest.
Formula tool to write a command for a bat, this is allowing me to run the second batch with different parameters (there are a lot of ways I could approach this).
Run tool outputs the batch file to run and then configure to run it, attached to the Run tool is another batch that actually does the mkdir, the input is a log that shows whether the directory was created or if the directory already exists.