I am reading three files to combine and the output of today's will be used as the input next day. so when reading this output as the input next day, can I keep same name for the input and output? Idea is to read a file name "ABC" as the input and then combining it with other file output as the file name "ABC".
Solved! Go to Solution.
Hi Ayush,
It would display an error, as the file is being used by two processes at the same time.
Instead, you could add a suffix to your output file using "Take File/Table Name from Field" and read (e.g. abc*.csv to input all file with the same prefix and file format). But, that would make it more complex
Here is what you can do.
Configure Input tool to get the full path
It pulls in full path, filename and sheetname
And in output tool configure it to change path based on filename.
Make sure output option is overwrite.
Hope this helps 🙂 Feel to ask if you have any questions
If this post helps you please mark it as solution. And give a like if you dont mind 😀👍
I assume you are talking Excel files? Otherwise, I believe this will work for other file types as well:
You can use the Block Until Done tool, which will ensure that the input is all read and the file closed before outputting the new data to the same file. This will ensure that the Input and Output tools do not conflict. Please see the example below
Wow @Per this is awesome. Thanks!!!
Hi @atcodedog05
I played with your file and it worked pretty well but not sure why it didn't work on the actual data that I am working on. I am receiving error - "You must specify a file name".
Thanks
Hi @Per,
It worked but I am getting an error message (enclosed) that file is corrupted although I am able to access file. Is it ok?
Thanks
Just specify a temp file name in output tool.
Since output need to have a filename configured. Even though it wont be used.
Hi @ayush_mishra,
If possible, copy contents (not formatting) of the file to an entirely new file, and try and run it again. I would not trust a corrupted file, even if you are able to open it now.
Hi @atcodedog05. thanks for your response.
I think, I understand what is the issue here. I am joining Two files. I am not reading File Path from Left input but Right input. And when I join and create Union, File Name column has two values NULL and File path from Right input. Probably this is causing the issue when I am doing Output. Alteryx might be getting confused seeing NULL value as Path. How do I solve this?
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
6 |