Filenames in mail message text

Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
3 posts Page 1 of 1


Posts: 32
Joined: Wed Dec 19, 2012 9:57 am

Post by Joerg » Tue Dec 17, 2013 2:21 am

I try to put a file list into message text. If I use a filelist var I've got the complete path and file name. With a loop I concat the single filenames (name attribut) into a string var. Additional a new line and CR cahr. But if i put this var into my mail message text, there is no CR.

How can I produce a little tab with the filenames within message text?

with regards


Posts: 18
Joined: Wed Jan 02, 2013 5:27 am
Location: Mapledurham, UK

Post by Jonathan » Tue Dec 17, 2013 9:28 am
Hi Joerg,

You can try this project, It will loop through the files in a path and return a variable called files which contains all of the files with a tab at the start and CRLF at the end.
Code: Select all
Code: Select all
<project name="Filenames with tabs" mainModule="Main" version="2.0">

	<module name="Main">

		<createFileList fileListVariable="fileList" version="1.0">
			<fileset dir="${path}" />

		<forEachLoop itemsVariable="${fileList}" currentItemVariable="thisFile">

			<setVariable name="files" value="${Concat(files,, String(thisFile:name), system.carriageReturn, system.lineFeed)}" version="2.0" />


		<sendEmail resourceId="SMTP_Resource" toList="[email protected]" version="2.0">
			<from address="[email protected]" />


	<variable name="path" value="/home/" description="Path to files" />
	<variable name="files" value="" description="Our list will end up here" />


Posts: 32
Joined: Wed Dec 19, 2012 9:57 am

Post by Joerg » Tue Dec 17, 2013 10:13 am
Hi Jonathan,

many thx, I tried it with '/n' without success.

Your code works and helps.

3 posts Page 1 of 1