The backslashes in your file name should probably be escaped. You should probably also give the file name an extension. Here are some corrections for a working POC.
<gel:script
xmlns:core="jelly:core"
xmlns:email="jelly:email"
xmlns:file="jelly:com.niku.union.gel.FileTagLibrary"
xmlns:ftp="jelly:com.niku.union.gel.FTPTagLibrary"
xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
xmlns:soap="jelly:com.niku.union.gel.SOAPTagLibrary"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sql="jelly:sql"
xmlns:util="jelly:util"
xmlns:xog="http://www.niku.com/xog"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<core:catch var="gException">
<!--This determines the directory where all output files will be saved-->
<gel:parameter var="outputFileBaseDir" default="C:\\clarity_output\\"/>
<core:new className="java.util.Date" var="currDate"/>
<core:set var="currDate">
<gel:formatDate format="yyyy-MM-dd" dateVar="currDate"/>
</core:set>
<core:set var="outputFile" value="${outputFileBaseDir.concat(currDate).concat('.txt')}" />
<gel:log category="User-defined process" level="INFO" message="Running on file ${outputFile}" />
<gel:setDataSource dbId="niku"/>
<!-- Start writing CSV file-->
<file:writeFile delimiter="," fileName="${outputFile}" >
<gel:log category="User-defined process" level="INFO" message="Writing column headers " />
<file:line>
<file:column value="Resource_Name"/>
<file:column value="WWID"/>
</file:line>
<!--User Details-->
<sql:query escapeText="false" var="user_query">
<![CDATA[
select
full_name
,unique_name
from srm_resources srm
where
srm.IS_ACTIVE=1
--and rownum<5
]]>
</sql:query>
<core:forEach items="${user_query.rowsByIndex}" trim="true" var="row">
<file:line>
<core:forEach indexVar="c" begin="0" end="1" >
<gel:log category="User-defined process" level="info" message="inside file loop " />
<file:column value="${row[c]}"/>
</core:forEach>
</file:line>
</core:forEach>
</file:writeFile>
<gel:log category="User-defined process" level="info" message="End of the process " />
</core:catch>
<core:if test="${!empty(gException)}">
<gel:log>
${gException}
</gel:log>
</core:if>
</gel:script>