strDir = "C:\new\file\"&Replace(Year(date)&right("0"&Month(date),2),"-","")&"\"
If Not Fso.FolderExists(strDir) Then '폴더가 존재하지 않으면
strDir = Fso.CreateFolder(strDir) '폴더를 생성
Response.Write strDir & " 폴더 생성에 성공하였습니다."
Else
Response.Write strDir & " 폴더가 존재합니다."
End If
Set Fso = nothing
&Replace(Year(date)&right("0"&Month(date),2),"-","")&
파일 생성 날짜로 폴더 만드는 함수(예] 202202)
if문 으로 폴더 생성하기
<%
If isNull(upt_dt) Then
%>
<a class="plain2" href="/new/file/<%=Replace(Left(reg_dt,7),"-","")%>/<%=filename%>" target="_top" download><%=source_filename%></a>
<%
else
%>
<a class="plain2" href="/new/file/<%=Replace(Left(upt_dt,7),"-","")%>/<%=filename%>" target="_top" download><%=source_filename%></a>
<%
end if
%>
작성일 및 수정날 기준으로 폴더 생성
-> 날짜 폴더 불러오기(예]\new\file\202202)
-> A태그 안에 download = 뷰 페이지에서 바로 첨부파일 다운로드 가능