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.
A backup file (.bak) is created as soon as a workflow is edited and saved. The .bak file will be the workflow in its state prior to the most recent save. The .bak file is created in the same directory as the edited workflow and carries the same name.
Also note that there are "autosaved" copies of workflows as well. You can see these under the File menu of Designer. (How often those are saved can be determined by what you set in User Settings under Options.
I used to do the same thing - delete them - just thought they were noise. But then I learned how to use them, and they are invaluable when you make changes to your modules.
Give it a try - next time you modfiy and existing module, after you "save" it, go to it's location, and find the .bak file. If you modified a yxmd, then change the ".bak" to ".bak.yxmd". If you modified a yxwz, then change the ".bak" to ".bak.yxwz". Then open the file. You'll see that it was the module you changed, but WITHOUT the changes you made. Great for version control.
How can I keep the .bak file from being created or delete it after the .xlsx file is updated using a workflow? I cannot append to the .xlsx file because I receive an error that the file is not accessible. I have to delete the .bak file and rerun my workflow. It then runs successfully. I want to eventually automate this workflow, but can't until I fix this problem.
The .bak file is used to save the previous version of the file you are overwriting. This is not an option that can be removed as this is a fail safe if something happens to the new file and you can recover the previous version. You should never see more than one .bak for a file. It may be that there is an issue with the file itself that is causing the issue. I would attempt to write a new file and then see if you have any issues overwriting that file.
For the workflow's I totally get it, but why if I my output is either appending or overwriting a worksheet in excel is it creating one for that as well? Some of our reports are automated and published to a folder where they are picked up by sharepoint for end users. I don't want to write a new file just "update" the existing one with the new data.
'The first time you write a xlsx you won't get a .bak version.
When you next run the workflow Alteryx generates a .bak of the file you are about to overwrite and then writes your data to the file specified in the output tool.
What Martin is saying is you can simply remove the .bak extension and you would have the previous version of your xlsx file. That or you can open it from within Excel in the normal way.
You may not be able to remove the .bak part in the file browse if you do not have the 'File Name extensions' option ticked on the toolbar of your file explorer. Tick this and you can simply remove the .bak'
Now i'm not necessarily sure your automated reports will pick up the .bak files because they have this suffix and therefor shouldn't be recognised. So I would check this first. If they are then you could use the 'events' tab within the workflow configuration window to perform a cleanup run command which removes all .bak files from the directory when the workflow has completed running.
If you want more detail on how to do this let me know.
Thank you @BenMoss for the response. Our automated reports are dropped into a folder that is linked to sharepoint so when anything is posted into it there is a direct feed to sharepoint so the .xlsx.bak are showing up there. This is what I am trying to eliminate.
I tried the events tab to point to a batch file to delete them but no luck so far.