carriage return after extension
Posted: Mon Feb 13, 2017 10:21 am
We have some customers that have very long file names with embedded spaces such as Customer order - orders_20161129000786_-_20161129_199909X9999_6185773-2 PAGEs todays order_Claim .tiff. I am printiong the names of the files to a .txt file then e-mailing it. I then read the list and send it. The problem is for neatness I would like to send the list in a verticle list format such as:
----------
-----------
-----------
-----------
Not like this ------------------ --------------- ----------------- -------------
However it appears the file names sent to us have embedded spaces so it is not listing them correctly in the .txt file I read from. Each file will have an extension of .TIFF. Is there anyway to insert a carriage return after each .TIFF.
----------
-----------
-----------
-----------
Not like this ------------------ --------------- ----------------- -------------
However it appears the file names sent to us have embedded spaces so it is not listing them correctly in the .txt file I read from. Each file will have an extension of .TIFF. Is there anyway to insert a carriage return after each .TIFF.
Code: Select all
<project name="Test_email" mainModule="Main" version="2.0" logLevel="debug">
<module name="Main">
<createWorkspace version="1.0" />
<timestamp label="date_time" version="1.0">
<format outputVariable="Date" pattern="MM/dd/yyyy" />
<format outputVariable="time" pattern="HH:mm" />
</timestamp>
<createFileList label="create e-mail list" fileListVariable="filelist" numFilesFoundVariable="filecnt" version="1.0" disabled="false">
<fileset dir="resource:smb://test_customers/test/SFTPHome/SDS/OUTBOUND">
<wildcardFilter>
<include pattern="customer*.*" />
</wildcardFilter>
</fileset>
</createFileList>
<forEachLoop itemsVariable="${filelist}" currentItemVariable="currentfile" disabled="false">
<print file="resource:smb://test_customers/test/SFTPHome/SDS/OUTBOUND/Archive/files.txt" append="true" version="1.0" disabled="false">
<![CDATA[${currentfile:name} ${system.carriageReturn}]]>
</print>
</forEachLoop>
<copy sourceFilesVariable="${currentfile}" destDir="${system.job.workspace}" whenFileExists="overwrite" destinationFilesVariable="copiedfiles" version="1.0" disabled="false" />
<zip inputFilesVariable="${copiedfiles}" outputFile="test.zip" outputFileVariable="zippedfiles" version="1.0" disabled="false" />
<setVariable name="zip" value="${zippedfiles:name}" version="2.0" disabled="false" />
<sendEmail resourceId="mail.usvendors.com" toList="[email protected]" version="2.0" disabled="false">
<from address="[email protected]" />
<message file="resource:smb://test_customers/testDEV/SFTPHome/tocust/OUTBOUND/Archive/files.txt">
<![CDATA[On ${CurrentDate('MM/dd/yy')} at ${CurrentTime('hh:mm a')} central time we are sending you the following ${filecnt} files in zip file
]]>
</message>
<subject>
<![CDATA[Proof of concept, e-mail generated from GOANYWHERE]]>
</subject>
</sendEmail>
<delete file="resource:smb://test_customer/test/SFTPHome/tocust/OUTBOUND/Archive/files.csv" version="1.0" disabled="true" />
<deleteWorkspace version="1.0" />
</module>
</project>