<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: change name while copying a file in vbs in Operating System - Microsoft</title>
    <link>https://community.hpe.com/t5/operating-system-microsoft/change-name-while-copying-a-file-in-vbs/m-p/4162882#M8719</link>
    <description>Instead of using strFiles.Name for the destination, simply place in your new file name.  For example:&lt;BR /&gt;&lt;BR /&gt;objFSO.CopyFile strFiles , strNewDest &amp;amp; "\" &amp;amp; something.txt&lt;BR /&gt;&lt;BR /&gt;If there are multiple ones, you could also just try adding the new extension:&lt;BR /&gt;&lt;BR /&gt;objFSO.CopyFile strFiles , strNewDest &amp;amp; "\" &amp;amp; strFiles.Name &amp;amp; ".txt"&lt;BR /&gt;</description>
    <pubDate>Tue, 18 Mar 2008 13:17:56 GMT</pubDate>
    <dc:creator>Gfuss</dc:creator>
    <dc:date>2008-03-18T13:17:56Z</dc:date>
    <item>
      <title>change name while copying a file in vbs</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/change-name-while-copying-a-file-in-vbs/m-p/4162879#M8716</link>
      <description>hi all,&lt;BR /&gt;&lt;BR /&gt;i have the following script,&lt;BR /&gt;and I want to change the name of destination file to&lt;BR /&gt; something.txt,&lt;BR /&gt;how to do it?&lt;BR /&gt;&lt;BR /&gt;N=Now&lt;BR /&gt;Set objFSO = CreateObject("Scripting.FileSystemObject")&lt;BR /&gt;strFolder="L:\"&lt;BR /&gt;strNewDest = "Q:\"&lt;BR /&gt;Set objFolder = objFSO.GetFolder(strFolder)&lt;BR /&gt;For Each strFiles In objFolder.Files&lt;BR /&gt;      If DateDiff("d",N, strFiles.DateLastModified) = -1 Then            &lt;BR /&gt;            objFSO.CopyFile strFiles , strNewDest &amp;amp; "\" &amp;amp; strFiles.Name&lt;BR /&gt;      End If&lt;BR /&gt;Next&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 17 Mar 2008 12:49:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/change-name-while-copying-a-file-in-vbs/m-p/4162879#M8716</guid>
      <dc:creator>kabucek</dc:creator>
      <dc:date>2008-03-17T12:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: change name while copying a file in vbs</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/change-name-while-copying-a-file-in-vbs/m-p/4162880#M8717</link>
      <description>kabucek,&lt;BR /&gt;&lt;BR /&gt;Using .MoveFile, you can specify the new name as shown below:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;objFSO.MoveFile "C:\myFileName.txt" , "C:\myNewFileName.txt"</description>
      <pubDate>Tue, 18 Mar 2008 10:17:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/change-name-while-copying-a-file-in-vbs/m-p/4162880#M8717</guid>
      <dc:creator>Gfuss</dc:creator>
      <dc:date>2008-03-18T10:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: change name while copying a file in vbs</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/change-name-while-copying-a-file-in-vbs/m-p/4162881#M8718</link>
      <description>but these files are ntbackup reports and the name changes periodically.&lt;BR /&gt;i want to catch "NewestFile" and copy that file.&lt;BR /&gt;thanks&lt;BR /&gt;</description>
      <pubDate>Tue, 18 Mar 2008 13:05:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/change-name-while-copying-a-file-in-vbs/m-p/4162881#M8718</guid>
      <dc:creator>kabucek</dc:creator>
      <dc:date>2008-03-18T13:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: change name while copying a file in vbs</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/change-name-while-copying-a-file-in-vbs/m-p/4162882#M8719</link>
      <description>Instead of using strFiles.Name for the destination, simply place in your new file name.  For example:&lt;BR /&gt;&lt;BR /&gt;objFSO.CopyFile strFiles , strNewDest &amp;amp; "\" &amp;amp; something.txt&lt;BR /&gt;&lt;BR /&gt;If there are multiple ones, you could also just try adding the new extension:&lt;BR /&gt;&lt;BR /&gt;objFSO.CopyFile strFiles , strNewDest &amp;amp; "\" &amp;amp; strFiles.Name &amp;amp; ".txt"&lt;BR /&gt;</description>
      <pubDate>Tue, 18 Mar 2008 13:17:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/change-name-while-copying-a-file-in-vbs/m-p/4162882#M8719</guid>
      <dc:creator>Gfuss</dc:creator>
      <dc:date>2008-03-18T13:17:56Z</dc:date>
    </item>
  </channel>
</rss>

