Icon

Move corrupted Excel Files from folder

There has been no title set for this workflow's metadata.

Demo workflow to find all corrupted xlsx files in a folder and move them to a "bad" folder.

Find all .xlsx filesin c:\temp folderchange this to yourrequired folderget each file path as variableattempt to openhandle errorstop branch no errorbottom branch - failurewe assume that if there is an errorin opening file, it is becausefile is corrupt!move file to "bad" folderdo nothing simply here to allow usto connect flow to the lower branchdo nothing simply here to allow usto connect flow to the lower branchopen a blank "template" copyof the spreadsheetcontaining the headings but not data.This is used in place of a corrupted filereplace this with Variable Loop Endif simply removing bad files, and don't need to consolidatethe rows from each execute to view workflow data area foldersList Files/Folders Table Row ToVariable Loop Start Excel Reader Try (VariablePorts) Catch Errors(Data Ports) Java IF (Table) End IF Transfer Files NoOp (Table) NoOp (Table) Excel Reader Loop End Open File or Folder Find all .xlsx filesin c:\temp folderchange this to yourrequired folderget each file path as variableattempt to openhandle errorstop branch no errorbottom branch - failurewe assume that if there is an errorin opening file, it is becausefile is corrupt!move file to "bad" folderdo nothing simply here to allow usto connect flow to the lower branchdo nothing simply here to allow usto connect flow to the lower branchopen a blank "template" copyof the spreadsheetcontaining the headings but not data.This is used in place of a corrupted filereplace this with Variable Loop Endif simply removing bad files, and don't need to consolidatethe rows from each execute to view workflow data area foldersList Files/Folders Table Row ToVariable Loop Start Excel Reader Try (VariablePorts) Catch Errors(Data Ports) Java IF (Table) End IF Transfer Files NoOp (Table) NoOp (Table) Excel Reader Loop End Open File or Folder

Nodes

Extensions

Links