community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

What is bak file used for?

Highlighted
Asteroid

Hi,

 

Every time, after ran the workflow, it will generate a bak file in the same folder.

 

I delete them before, nothing change. I would like to know what is this used for ?  Thank you.

 

Alteryx Alumni (Retired)

According to the Help doc...

 

.bak (Backup copy of a workflow)

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.

 

Pulsar
Pulsar

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.

Thank you 

Meteor

I am also running into the same issue with the output data tool.  I am overwriting the data that feeds a pivot table and would like to not have this created for those.  Any updates on this?

JP2

Community Operations Manager
Community Operations Manager

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.

Meteor

DanM,

 

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.

 

JP2

Alteryx Certified Partner
Alteryx Certified Partner

Here is my understanding...

 

'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. 

Meteor

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.

 

JP2

Alteryx Certified Partner
Alteryx Certified Partner

Okay, let me try and help with that.

You should be able to create a '.bat' file which has the following script:

 

del "fullpath\*.xlsx.bak"

 

 Your events should be configured to run on completion and you should just navigate to this file using the command folder browse, leaving both the command arguments and working directory blank.

 

Ben

Labels