So let say I have a Excel file with data given so i need to copy same data with multiple file should create in the folder with different files name but when i run the workflow the output should be same data with another file name that's my quary of the day .
Solved! Go to Solution.
How many extra files(with same data) you want in folder or each time you run it will create one extra file?
@vijayanaparthi yes vijay how many time i will run that workflow that many times i should get output with same data as output file
Hi Upendra,
Below are the steps you can follow to get new file everytime you run with different file name.
Step 1 - Take directory tool and and add folder path.
Step 2 - Take filter and configuration of filter tool is like where Contains(FileName, 'Test.xlsx'(Let's say file name is Test.xlsx.
Step 3 - Count number of Rows that is coming from True anchor of filter tool.
Step 4 - Join both True anchor tool and count output by using join multiple tool on record position.
Step 5 - Use sort tool to Descending order of Count column.
Step 6 - Use sample tool to pick 1st row only.
Step 7 - You need to use Formula tool, where you need to add the logic that i attached as image. In my case Data is sheet name.
Step 8 - Then use Dynamic input tool and Use change entire filepath as configuration and use Fullpath column as filed.
Step 9- Take only New_Filename column from step 7 formula tool output.
Step 10 - Join Step 8 and step 9 output by using join multiple to on record position.
Step 11 - Finally use output tool, configuration as Change entire file path and field you have to pass New_FileName there.
Now everytime you run workflow it will produce new file with different filename and same data. It looks like Test.xlsx, Test_2.xlsx, Test_3.xlsx ---- etc.
Hi @vijayanaparthi so i have done all the tool using the following steps u said but i am getting the error in output tool could u have in detail way how to set output tool and also once i set the file name its saving when i am rerun the workflow its show error
Ok i think before output tool, you can see i am using Multi row formula tool. So in that tool update New_Filename column and expression will be like
If isnull([New_Filename]) then [row-1:New_Filename] else [New_Filename] endif
In output tool, just you need the configuration like Change the entire file path then in the field pass the New_Filename column
User | Count |
---|---|
19 | |
14 | |
13 | |
9 | |
8 |