Page 1 of 1

Deleting files from Windows Share

Posted: Tue Apr 15, 2014 2:25 pm
by gmoisant
How do I delete files from a windows share using a filelist variable?

Re: Deleting files from Windows Share

Posted: Tue Apr 15, 2014 3:13 pm
by Support_Rick
Create your Windows Share File List Variable:
Code: Select all
		<createFileList label="Create Filelist" fileListVariable="MyFileList" version="1.0">
			<fileset dir="\\MyServer\MySubFolder\MyFolderLocation\" recursive="false">
				<wildcardFilter>
					<include pattern="*.txt" caseSensitive="false" />
				</wildcardFilter>
			</fileset>
		</createFileList>
Then, execute the Delete Task with the variable created in the CreateFileList above:
Code: Select all
		<delete label="Delete My Original Files" inputFilesVariable="${MyFileList}" version="1.0"/>
Keep in mind, the FileList Variable could be created via a Monitor, Copy, Rename, Delete, FTP,and several other ways. Not just by a CreateFileList.