<?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 DOS Batch  file for FTP and rename in Operating System - Microsoft</title>
    <link>https://community.hpe.com/t5/operating-system-microsoft/dos-batch-file-for-ftp-and-rename/m-p/3116625#M3385</link>
    <description>Hi,&lt;BR /&gt;How can I develop a dos .bat file to ftp&lt;BR /&gt;and rename all *.txt file to *.old.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;</description>
    <pubDate>Tue, 11 Nov 2003 22:30:19 GMT</pubDate>
    <dc:creator>Printaporn_1</dc:creator>
    <dc:date>2003-11-11T22:30:19Z</dc:date>
    <item>
      <title>DOS Batch  file for FTP and rename</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/dos-batch-file-for-ftp-and-rename/m-p/3116625#M3385</link>
      <description>Hi,&lt;BR /&gt;How can I develop a dos .bat file to ftp&lt;BR /&gt;and rename all *.txt file to *.old.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;</description>
      <pubDate>Tue, 11 Nov 2003 22:30:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/dos-batch-file-for-ftp-and-rename/m-p/3116625#M3385</guid>
      <dc:creator>Printaporn_1</dc:creator>
      <dc:date>2003-11-11T22:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: DOS Batch  file for FTP and rename</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/dos-batch-file-for-ftp-and-rename/m-p/3116626#M3386</link>
      <description>You didn't mention what version of windoze.... anywho, this may work for you.&lt;BR /&gt;&lt;BR /&gt;@echo off&lt;BR /&gt;echo open 192.168.0.1&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;echo USER username passwd&amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;echo lcd c:\my_dir&amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;echo cd /tmp&amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;echo mget file*.txt&amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;echo quit&amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;echo bye&amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;FTP -i -n -s:%TEMP%\ftp.txt&lt;BR /&gt;del %TEMP%\ftp.txt&lt;BR /&gt;cd c:\my_dir&lt;BR /&gt;ren *.txt *.old&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Cut/paste the example to your batch file, change username/passwd/ip...etc to your info and run it.&lt;BR /&gt;&lt;BR /&gt;If you need to upload the files to the ftp after they're renamed, use the same as abov... just modify it so that it does an mput.&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;-Denver</description>
      <pubDate>Wed, 12 Nov 2003 00:00:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/dos-batch-file-for-ftp-and-rename/m-p/3116626#M3386</guid>
      <dc:creator>Denver Osborn</dc:creator>
      <dc:date>2003-11-12T00:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: DOS Batch  file for FTP and rename</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/dos-batch-file-for-ftp-and-rename/m-p/3116627#M3387</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Thanks Denver for your post.&lt;BR /&gt;But my requirement is FTP some files to host&lt;BR /&gt;after finish FTP we will rename those file that we just FTP. To ensure that it was sucessful ftp.&lt;BR /&gt;We don't want to rename at local then ftp.&lt;BR /&gt;&lt;BR /&gt;Any more advise is welcome.&lt;BR /&gt;thanks in advance,</description>
      <pubDate>Wed, 12 Nov 2003 01:27:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/dos-batch-file-for-ftp-and-rename/m-p/3116627#M3387</guid>
      <dc:creator>Printaporn_1</dc:creator>
      <dc:date>2003-11-12T01:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: DOS Batch  file for FTP and rename</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/dos-batch-file-for-ftp-and-rename/m-p/3116628#M3388</link>
      <description>If the ftp server supports RNTO RNFR then you should be able to rename a file.&lt;BR /&gt;&lt;BR /&gt;@echo off&lt;BR /&gt;echo open 192.168.0.1&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;echo USER username passwd&amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;echo lcd c:\my_dir&amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;echo cd /tmp&amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;echo mput file*.txt&amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;echo ren file1.txt&amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;echo file1.old&amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;echo quit&amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;echo bye&amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;FTP -i -n -s:%TEMP%\ftp.txt&lt;BR /&gt;del %TEMP%\ftp.txt&lt;BR /&gt;&lt;BR /&gt;The ftp server I tested with supported RNTO/RNFR (use remotehelp to verify). Although I could rename a file, I wasn't able to use wildcards with ren through ftp.&lt;BR /&gt;&lt;BR /&gt;If you need to rename all *.txt files to *.old after they've been uploaded to ftp server, then maybe there is a way you could automate the list creation to put the entries in the %TEMP%\ftp.txt file for you.... unfortunately I'm a unix ggek and not sure of any dos utils to help build/format the file from a dir listing to make it look like&lt;BR /&gt;&lt;BR /&gt;echo ren file1.txt&lt;BR /&gt;echo file1.old&lt;BR /&gt;echo ren file2.txt&lt;BR /&gt;echo file2.old&lt;BR /&gt;echo ren ....  etc...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;-Denver&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Nov 2003 08:24:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/dos-batch-file-for-ftp-and-rename/m-p/3116628#M3388</guid>
      <dc:creator>Denver Osborn</dc:creator>
      <dc:date>2003-11-12T08:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: DOS Batch  file for FTP and rename</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/dos-batch-file-for-ftp-and-rename/m-p/3116629#M3389</link>
      <description>Hi&lt;BR /&gt;Do you know name of files to download?&lt;BR /&gt;If yes user rename command.&lt;BR /&gt;You could:&lt;BR /&gt;a) Load files from remote as suggested by Denver into local temp folder.&lt;BR /&gt;b) Then you rename on FTP server&lt;BR /&gt;@echo off&lt;BR /&gt;echo open 192.168.0.1&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;echo username &amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;echo password &amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;rem here it is a uniqueline&lt;BR /&gt;for %%i in (*.*) do echo rename %%i *.old &amp;gt;&amp;gt; %TEMP%\ftp.txt&lt;BR /&gt;rem end of line&lt;BR /&gt;echo bye &amp;gt;&amp;gt; %TEMP%\ftp.txt&lt;BR /&gt;FTP -i -n -s:%TEMP%\ftp.txt&lt;BR /&gt;del %TEMP%\ftp.txt&lt;BR /&gt;&lt;BR /&gt;Bye&lt;BR /&gt;Antoniov&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Nov 2003 08:37:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/dos-batch-file-for-ftp-and-rename/m-p/3116629#M3389</guid>
      <dc:creator>Antoniov.</dc:creator>
      <dc:date>2003-11-12T08:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: DOS Batch  file for FTP and rename</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/dos-batch-file-for-ftp-and-rename/m-p/3116630#M3390</link>
      <description>I have a Perl program that I modified which may do about what you want.  The original program was written to check a website and download any new files.  It now looks in a certain folder on its own harddrive to see if there are any new files, if it finds any, then it ftps them to the server.  If the ftp of a file is successful then it moves it to a Sent folder.  It also purges the Sent folder every time it runs of any files which are over X days old.  It's a lot more reliable than DOS.&lt;BR /&gt;&lt;BR /&gt;You would have to install Perl on your PC.  It's free but takes about 6 Meg of space.  If you are interested let me know and I will dig it out.&lt;BR /&gt;&lt;BR /&gt;Ron</description>
      <pubDate>Wed, 12 Nov 2003 09:25:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/dos-batch-file-for-ftp-and-rename/m-p/3116630#M3390</guid>
      <dc:creator>Ron Kinner</dc:creator>
      <dc:date>2003-11-12T09:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: DOS Batch  file for FTP and rename</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/dos-batch-file-for-ftp-and-rename/m-p/3116631#M3391</link>
      <description>thanks to Antionov for the "for %%i" info about dos.... gave me an idea to create the file list (may depend on your ver of Windows/Dos cmd). Antioniov's ren would rename the file from file1.txt to file1.txt.old instead of file1.old. This change below to the for %%i will make the ren from file1.txt to file1.old...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;@echo off&lt;BR /&gt;echo open 192.168.0.1&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;echo USER username passwd&amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;echo lcd c:\my_dir&amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;echo cd /tmp&amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;echo mput file*.txt&amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;for %%i in (*.txt) do echo ren %%~ni.txt %%~ni.old &amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;echo quit&amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;echo bye&amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;FTP -i -n -s:%TEMP%\ftp.txt&lt;BR /&gt;del %TEMP%\ftp.txt&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-Denver</description>
      <pubDate>Wed, 12 Nov 2003 09:47:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/dos-batch-file-for-ftp-and-rename/m-p/3116631#M3391</guid>
      <dc:creator>Denver Osborn</dc:creator>
      <dc:date>2003-11-12T09:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: DOS Batch  file for FTP and rename</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/dos-batch-file-for-ftp-and-rename/m-p/3116632#M3392</link>
      <description>Hi Denver,&lt;BR /&gt;&lt;BR /&gt; echo mput file*.txt&amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;for %%i in (*.txt) do echo ren %%~ni.txt %%~ni.old &amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;&lt;BR /&gt;i think the above 2 lines should look like&lt;BR /&gt;&lt;BR /&gt;echo mput file*.txt&amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;for %%i in (file*.txt) do echo ren %%i.txt %%i.old &amp;gt;&amp;gt;%TEMP%\ftp.txt&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Ganesh</description>
      <pubDate>Wed, 12 Nov 2003 16:49:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/dos-batch-file-for-ftp-and-rename/m-p/3116632#M3392</guid>
      <dc:creator>Ganesh Babu</dc:creator>
      <dc:date>2003-11-12T16:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: DOS Batch  file for FTP and rename</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/dos-batch-file-for-ftp-and-rename/m-p/3116633#M3393</link>
      <description>Thanks ! the script really work for me with little modification.</description>
      <pubDate>Wed, 12 Nov 2003 23:29:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/dos-batch-file-for-ftp-and-rename/m-p/3116633#M3393</guid>
      <dc:creator>Printaporn_1</dc:creator>
      <dc:date>2003-11-12T23:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: DOS Batch  file for FTP and rename</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/dos-batch-file-for-ftp-and-rename/m-p/6977403#M11700</link>
      <description>&lt;P&gt;You can very easily&lt;SPAN&gt;&amp;nbsp;develop a dos .bat file to ftp&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;and rename all *.txt file to *.old.&amp;nbsp;by simply using&lt;/SPAN&gt;&amp;nbsp;Batch Rename Files Tool. You can easily found hier BatchRenameFiles.org. It is very powerful and simple to use software.&lt;/P&gt;</description>
      <pubDate>Sat, 21 Oct 2017 19:25:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/dos-batch-file-for-ftp-and-rename/m-p/6977403#M11700</guid>
      <dc:creator>jonathan2</dc:creator>
      <dc:date>2017-10-21T19:25:47Z</dc:date>
    </item>
  </channel>
</rss>

