<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Web Wiz Support and Community Forums : File Upload renaming</title>
  <link>https://forums.webwiz.net/</link>
  <description><![CDATA[This is an XML content feed of; Web Wiz Support and Community Forums : Web Wiz Forums : File Upload renaming]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 11 Apr 2026 19:06:24 +0000</pubDate>
  <lastBuildDate>Thu, 01 Jun 2006 01:19:04 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.08</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>https://forums.webwiz.net/RSS_post_feed.asp?TID=19762</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Web Wiz Support and Community Forums]]></title>
   <url>https://forums.webwiz.net/forum_images/web_wiz_forums.png</url>
   <link>https://forums.webwiz.net/</link>
  </image>
  <item>
   <title><![CDATA[File Upload renaming : I tried editing both those files...]]></title>
   <link>https://forums.webwiz.net/file-upload-renaming_topic19762_post108216.html#108216</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://forums.webwiz.net/member_profile.asp?PF=23591">jckruger</a><br /><strong>Subject:</strong> 19762<br /><strong>Posted:</strong> 01&nbsp;June&nbsp;2006 at 1:19am<br /><br />I tried editing both those files with this:<DIV>&nbsp;</DIV><DIV>--------------------------------------------------------%&gt;--------------------------------</DIV><DIV>'See if file exsists<BR>&nbsp;&nbsp;If objFSO.FileExists(Server.MapPath(strUploadFilePath &amp; "\temp\" &amp; saryFileUploads(intLoop))) Then<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT color=#ff0000>'Delete file in uploads before moving new one from Temp directory<BR>&nbsp;&nbsp;&nbsp;objFSO.DeleteFile Server.MapPath(strUploadFilePath &amp; "\" &amp; saryFileUploads(intLoop))</FONT><BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;'Move file<BR>&nbsp;&nbsp;&nbsp;objFSO.MoveFile Server.MapPath(strUploadFilePath &amp; "\temp\" &amp; saryFileUploads(intLoop)), Server.MapPath(strUploadFilePath &amp; "\" &amp; saryFileUploads(intLoop))</DIV><DIV>--------------------------------------------------------%&gt;--------------------------------</DIV><DIV>&nbsp;</DIV><DIV>I also edited functions_upload.asp with this:</DIV><DIV>&nbsp;</DIV><DIV><DIV>--------------------------------------------------------%&gt;--------------------------------</DIV></DIV><DIV>'If the file is OK save it to disk<BR>&nbsp;&nbsp;&nbsp;&nbsp;If lngErrorFileSize = 0 AND blnExtensionOK Then</DIV><DIV>&nbsp;&nbsp;&nbsp;<FONT color=#ff0000>&nbsp;'### DISABLED TO KEEP FILENAME THE SAME ###&nbsp;</FONT><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Create a new file name for the file with the date a time included<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT color=#ff0000>'</FONT>strNewFileName = newFileName(strNewFileName)&nbsp;' <FONT color=#ff0000>commented out</FONT><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Save the file to disk<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Files(1).SaveAs strFileUploadPath &amp; "/" &amp; strNewFileName</DIV><DIV><DIV>--------------------------------------------------------%&gt;--------------------------------</DIV><DIV>&nbsp;</DIV><DIV>and it seems to work OK in my lab. The original file is deleted just befote the file is moved from the temp directory.</DIV><DIV>&nbsp;</DIV><DIV>What I was having trouble with was that the objFSO.MoveFile was not moving the file if the same name file existed so I delete the file with objFSO.DeleteFile function in the uploads folder (not the "temp" folder) just before the file move function.</DIV><DIV>&nbsp;</DIV><DIV>Feedback welcome.</DIV><DIV>&nbsp;</DIV><DIV>Cheers Justin</DIV></DIV>]]>
   </description>
   <pubDate>Thu, 01 Jun 2006 01:19:04 +0000</pubDate>
   <guid isPermaLink="true">https://forums.webwiz.net/file-upload-renaming_topic19762_post108216.html#108216</guid>
  </item> 
  <item>
   <title><![CDATA[File Upload renaming : Files are moved from the temp...]]></title>
   <link>https://forums.webwiz.net/file-upload-renaming_topic19762_post108177.html#108177</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://forums.webwiz.net/member_profile.asp?PF=1">WebWiz-Bruce</a><br /><strong>Subject:</strong> 19762<br /><strong>Posted:</strong> 31&nbsp;May&nbsp;2006 at 3:24pm<br /><br />Files are moved from the temp directory in the files, new_posts.asp and edit_post.asp]]>
   </description>
   <pubDate>Wed, 31 May 2006 15:24:31 +0000</pubDate>
   <guid isPermaLink="true">https://forums.webwiz.net/file-upload-renaming_topic19762_post108177.html#108177</guid>
  </item> 
  <item>
   <title><![CDATA[File Upload renaming : Hi All, Wheremight the code be...]]></title>
   <link>https://forums.webwiz.net/file-upload-renaming_topic19762_post108150.html#108150</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://forums.webwiz.net/member_profile.asp?PF=23591">jckruger</a><br /><strong>Subject:</strong> 19762<br /><strong>Posted:</strong> 31&nbsp;May&nbsp;2006 at 7:19am<br /><br /><P>Hi All,</P><DIV>Where&nbsp;might the code be that moves the file from the Temp directory into the uploads directory?. I am going to try some code that will delete the file in the uploads directory before the file is moved as it currently will not move the file if the same filename exists. I have removed the additional date part and have found in functions_Upload.asp</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#ff0000>'Save the file to disk<BR>.Files(1).SaveAs strFileUploadPath &amp; "/" &amp; strNewFileName</FONT></DIV><DIV>&nbsp;</DIV><DIV>does overwrite the original. That is perfect.</DIV><DIV>&nbsp;</DIV><DIV>What I now need it to do is then delete the file in the uploads directory before moving the file from the temp directory. I only want this to happen when someone is editing a post and pressing "Update Post" or Post New Topic in a new topic. I don't want it to delete the file until these buttons are pressed like it is done now with the temp directory.</DIV><DIV>&nbsp;</DIV><DIV>This is so the person uploading can overwrite a file and not have to change any other references in other topics.</DIV><DIV>&nbsp;</DIV><DIV>Can someone give me a general idea where to look.</DIV><DIV>&nbsp;</DIV><DIV>I was thinking just to use: or somethink like it</DIV><DIV><FONT color=#0000cc></FONT>&nbsp;</DIV><DIV><FONT color=#ff0000>Set objFSO = Server.CreateObject("Scripting.FileSystemObject")<BR>objFSO.DeleteFile(YOUR_FILE)</FONT></DIV><DIV><FONT color=#0000cc></FONT><BR>I just need to know where</DIV><DIV>&nbsp;</DIV><DIV>Cheers</DIV><DIV>&nbsp;</DIV><DIV>Justin</DIV>]]>
   </description>
   <pubDate>Wed, 31 May 2006 07:19:45 +0000</pubDate>
   <guid isPermaLink="true">https://forums.webwiz.net/file-upload-renaming_topic19762_post108150.html#108150</guid>
  </item> 
  <item>
   <title><![CDATA[File Upload renaming : You could change it in the functions_upload.asp...]]></title>
   <link>https://forums.webwiz.net/file-upload-renaming_topic19762_post106582.html#106582</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://forums.webwiz.net/member_profile.asp?PF=1">WebWiz-Bruce</a><br /><strong>Subject:</strong> 19762<br /><strong>Posted:</strong> 09&nbsp;May&nbsp;2006 at 9:06am<br /><br />You could change it in the functions_upload.asp file, but be warned if you remove the date/time part, your forum upload function will probably become unstable and you will have issues with files of the same name.]]>
   </description>
   <pubDate>Tue, 09 May 2006 09:06:18 +0000</pubDate>
   <guid isPermaLink="true">https://forums.webwiz.net/file-upload-renaming_topic19762_post106582.html#106582</guid>
  </item> 
  <item>
   <title><![CDATA[File Upload renaming :   I have just been queried about...]]></title>
   <link>https://forums.webwiz.net/file-upload-renaming_topic19762_post106509.html#106509</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://forums.webwiz.net/member_profile.asp?PF=23591">jckruger</a><br /><strong>Subject:</strong> 19762<br /><strong>Posted:</strong> 08&nbsp;May&nbsp;2006 at 10:39am<br /><br />I have just been queried about the file upload option by one of my forum members.<DIV>&nbsp;</DIV><DIV>As part of their file version control they would like to see the file name as they uploaded it if possible and not to have the file ammended with the date and time at the start. Obviously I would tell them to keep the file name to a minimum as the preview window truncates the file name for viewing space.</DIV><DIV>&nbsp;</DIV><DIV>Where might the part be that renames the file with the date and time.</DIV><DIV>&nbsp;</DIV><DIV>Thanks in advance</DIV><DIV>&nbsp;</DIV><DIV>Justin</DIV>]]>
   </description>
   <pubDate>Mon, 08 May 2006 10:39:19 +0000</pubDate>
   <guid isPermaLink="true">https://forums.webwiz.net/file-upload-renaming_topic19762_post106509.html#106509</guid>
  </item> 
 </channel>
</rss>