How to remove a specific repeatedly uploaded file?

Post any question you may have in regards to GoAnywhere MFT and let our talented support staff and other users assist you.
If you need a quicker response, please create a support ticket via the customer portal my.goanywhere.com or contact our support team by email at [email protected].
2 posts Page 1 of 1

draymer

Posts: 1
Joined: Wed Apr 25, 2018 4:13 pm

Post by draymer » Thu Nov 01, 2018 11:39 am
We have a client that keeps uploading a Thumbs.db file every 5 minutes and it creates a ton of triggers. They also upload additional files periodically so I can't quite ignore it, but I want to the project to delete the Thumbs.db file every single time they upload before it even goes thru the rest of the project to push the files to another location.

I tried doing this but it bombs out with "ERROR [8099 - Create File List] An unexpected error occurred. Variable not found: Thumbs.db" and I'm a little confused:
Code: Select all
		<createFileList fileListVariable="files" version="1.0">
			<fileset dir="/path/to/inbound/" recursive="false" sortedBy="name" sortOrder="ascending">
				<wildcardFilter>
					<include pattern="*" caseSensitive="false" />
				</wildcardFilter>
			</fileset>
		</createFileList>

		<if label="If Thumbs.db File" condition="${files eq Thumbs.db}">

			<delete label="Delete Thumbs.db file" file="/path/to/inbound/Thumbs.db" version="1.0" onError="continue" />

			<else>
I know this is going to be a simple solution but it's driving me crazy trying to get this working. Thanks

Support_Andy

Posts: 8
Joined: Thu Feb 16, 2017 11:03 am

Post by Support_Andy » Tue Dec 18, 2018 12:02 pm
There are several ways to handle these unwanted files. Attached is a basic project that lists out the directory and then uses a For Each Loop to loop through each file looking for a file named ‘thumbs.db’, if it detects the file it deletes it. You can then use the else condition to do your normal tasks in the project.
Note: Project XML attachments are not valid on every version of GoAnywhere
This attachment was created in version 5.7.7
Delete a thumbs db file.xml
Delete a thumbs db file
(608 Bytes) Downloaded 693 times
2 posts Page 1 of 1