 




<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to FTP a file from PC to my personal library?</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/how-to-ftp-a-file-from-pc-to-my-personal-library/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-ftp-a-file-from-pc-to-my-personal-library/</link>
	<description></description>
	<lastBuildDate>Wed, 22 May 2013 18:27:48 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: gilly400</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-ftp-a-file-from-pc-to-my-personal-library/#comment-52564</link>
		<dc:creator>gilly400</dc:creator>
		<pubDate>Tue, 01 Apr 2008 12:33:58 +0000</pubDate>
		<guid isPermaLink="false">#comment-52564</guid>
		<description><![CDATA[Hi,

I also have a PC batch file (for windows XP) which I sometimes use for basic FTP transfers.  This doesn&#039;t do any error checking, it&#039;s just a quick and dirty front end to FTP.  Just cut and paste the text under this into a PC text file and save as something like FTPFIL.BAT 

Cheers,

Martin Gilbert.

@REM
@REM *****************************************
@REM *** FTPFIL.BAT                        ***
@REM *** =============                     ***
@REM *** FTP file between PC and AS400s    ***
@REM ***                                   ***
@REM *** Written by Martin Gilbert         ***
@REM *** October 2007                      ***
@REM *** V1.0                              ***
@REM ***                                   ***
@REM *****************************************
@REM
@color 0c
@cls
@REM *****************************************
@REM First enter all the parameters necessary
@REM ========================================
@REM
@REM cls between system name, user id password
@REM and putget to avoid showing all these
@REM parameters on the screen at the same time
@REM
@REM *****************************************
@echo .
@set /p sysnam=Please enter the AS400 system name..................: 
@if &quot;%sysnam%&quot;==&quot;&quot; goto nosysnam
@cls
@echo .
@set   /p user=Please enter your User Id...........................: 
@if &quot;%user%&quot;==&quot;&quot; goto nouser
@cls
@echo .
@set   /p pass=Please enter your password..........................: 
@if &quot;%pass%&quot;==&quot;&quot; goto nopass
@cls
@echo .
@set /p putget=Please enter put (to as400) or get (from as400).....: 
@if &quot;%putget%&quot;==&quot;&quot; goto noputget
@echo .
@set /p pcfile=Please enter the PC file name.......................: 
@if &quot;%pcfile%&quot;==&quot;&quot; goto nopcfile
@echo .
@set  /p aslib=Please enter the AS400 library......................: 
@if &quot;%aslib%&quot;==&quot;&quot; goto noaslib
@echo .
@set /p asfile=Please enter the AS400 file name....................: 
@if &quot;%asfile%&quot;==&quot;&quot; goto noasfile
@echo .
@set /p   mode=Please enter the ASCII or BIN for transfer mode.....: 
@if &quot;%mode%&quot;==&quot;&quot; goto nomode
@echo .
@cls
@REM *****************************************
@REM Show status messages
@REM *****************************************
@echo .
@if &quot;%putget%&quot;==&quot;put&quot; echo Sending file %pcfile% 
@if &quot;%putget%&quot;==&quot;put&quot; echo To system %sysnam% 
@if &quot;%putget%&quot;==&quot;put&quot; echo In library %aslib% as %asfile%
@if &quot;%putget%&quot;==&quot;get&quot; echo Retrieving file %asfile% In library %aslib%
@if &quot;%putget%&quot;==&quot;get&quot; echo From system %sysnam% 
@if &quot;%putget%&quot;==&quot;get&quot; echo To file %pcfile%
@echo Using %mode% mode
@echo Please wait
@REM *****************************************
@REM Delete old files
@REM *****************************************
@echo .
@if exist FTPFIL.FTP del /Q FTPFIL.FTP &gt; NUL
@if exist FTPFIL.LOG del /Q FTPFIL.LOG &gt; NUL
@REM *****************************************
@REM Build FTP script
@REM *****************************************
@echo .
@echo Building FTP script
@echo .
@echo %user% &gt; FTPFIL.FTP
@echo %pass% &gt;&gt; FTPFIL.FTP
@echo %mode% &gt;&gt; FTPFIL.FTP
@echo CD %aslib% &gt;&gt; FTPFIL.FTP
@if &quot;%putget%&quot;==&quot;put&quot; echo put %pcfile%  %asfile% &gt;&gt; FTPFIL.FTP
@if &quot;%putget%&quot;==&quot;get&quot; echo get %asfile%  %pcfile% &gt;&gt; FTPFIL.FTP
@echo quit &gt;&gt; FTPFIL.FTP
@REM *****************************************
@REM Run the FTP script
@REM *****************************************
@FTP -s:FTPFIL.FTP %sysnam% &gt; FTPFIL.LOG
@cls
@REM *****************************************
@REM Delete the FTP script IMPORTANT !
@REM FTP script contains user and password !
@REM *****************************************
@if exist FTPFIL.FTP del /Q FTPFIL.FTP &gt; NUL
@REM *****************************************
@REM Send completion message
@REM *****************************************
@echo .
@echo FTP session completed
@echo .
@goto end
@REM
@REM *****************************************
@REM *** Error handling.                   ***
@REM *****************************************
@REM
@REM *****************************************
:nosysnam
@echo .
@echo AS400 system name not entered
@echo Please try again
@echo .
@goto end
@REM *****************************************
:nouser
@echo .
@echo No user entered
@echo Please try again
@echo .
@goto end
@REM *****************************************
:nopass
@echo .
@echo No password entered
@echo Please try again
@echo .
@goto end
@REM *****************************************
:noputget
@echo .
@echo put or get must be entered
@echo Please try again
@echo .
@goto end
@REM *****************************************
:nopcfile
@echo .
@echo PC file name not entered
@echo Please try again
@echo .
@goto end
@REM *****************************************
:noaslib
@echo .
@echo AS400 library name not entered
@echo Please try again
@echo .
@goto end
@REM *****************************************
:noasfile
@echo .
@echo AS400 file name not entered
@echo Please try again
@echo .
@goto end
@REM *****************************************
:nomode
@echo .
@echo Transfer mode not entered
@echo Enter ASCII or BIN
@echo Please try again
@echo .
@goto end
@REM *****************************************
@REM *** End of program.                   ***
@REM *****************************************
@REM
:end
@pause
:exit]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I also have a PC batch file (for windows XP) which I sometimes use for basic FTP transfers.  This doesn&#8217;t do any error checking, it&#8217;s just a quick and dirty front end to FTP.  Just cut and paste the text under this into a PC text file and save as something like FTPFIL.BAT </p>
<p>Cheers,</p>
<p>Martin Gilbert.</p>
<p>@REM<br />
@REM *****************************************<br />
@REM *** FTPFIL.BAT                        ***<br />
@REM *** =============                     ***<br />
@REM *** FTP file between PC and AS400s    ***<br />
@REM ***                                   ***<br />
@REM *** Written by Martin Gilbert         ***<br />
@REM *** October 2007                      ***<br />
@REM *** V1.0                              ***<br />
@REM ***                                   ***<br />
@REM *****************************************<br />
@REM<br />
@color 0c<br />
@cls<br />
@REM *****************************************<br />
@REM First enter all the parameters necessary<br />
@REM ========================================<br />
@REM<br />
@REM cls between system name, user id password<br />
@REM and putget to avoid showing all these<br />
@REM parameters on the screen at the same time<br />
@REM<br />
@REM *****************************************<br />
@echo .<br />
@set /p sysnam=Please enter the AS400 system name&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;:<br />
@if &#8220;%sysnam%&#8221;==&#8221;" goto nosysnam<br />
@cls<br />
@echo .<br />
@set   /p user=Please enter your User Id&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;:<br />
@if &#8220;%user%&#8221;==&#8221;" goto nouser<br />
@cls<br />
@echo .<br />
@set   /p pass=Please enter your password&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..:<br />
@if &#8220;%pass%&#8221;==&#8221;" goto nopass<br />
@cls<br />
@echo .<br />
@set /p putget=Please enter put (to as400) or get (from as400)&#8230;..:<br />
@if &#8220;%putget%&#8221;==&#8221;" goto noputget<br />
@echo .<br />
@set /p pcfile=Please enter the PC file name&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..:<br />
@if &#8220;%pcfile%&#8221;==&#8221;" goto nopcfile<br />
@echo .<br />
@set  /p aslib=Please enter the AS400 library&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.:<br />
@if &#8220;%aslib%&#8221;==&#8221;" goto noaslib<br />
@echo .<br />
@set /p asfile=Please enter the AS400 file name&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..:<br />
@if &#8220;%asfile%&#8221;==&#8221;" goto noasfile<br />
@echo .<br />
@set /p   mode=Please enter the ASCII or BIN for transfer mode&#8230;..:<br />
@if &#8220;%mode%&#8221;==&#8221;" goto nomode<br />
@echo .<br />
@cls<br />
@REM *****************************************<br />
@REM Show status messages<br />
@REM *****************************************<br />
@echo .<br />
@if &#8220;%putget%&#8221;==&#8221;put&#8221; echo Sending file %pcfile%<br />
@if &#8220;%putget%&#8221;==&#8221;put&#8221; echo To system %sysnam%<br />
@if &#8220;%putget%&#8221;==&#8221;put&#8221; echo In library %aslib% as %asfile%<br />
@if &#8220;%putget%&#8221;==&#8221;get&#8221; echo Retrieving file %asfile% In library %aslib%<br />
@if &#8220;%putget%&#8221;==&#8221;get&#8221; echo From system %sysnam%<br />
@if &#8220;%putget%&#8221;==&#8221;get&#8221; echo To file %pcfile%<br />
@echo Using %mode% mode<br />
@echo Please wait<br />
@REM *****************************************<br />
@REM Delete old files<br />
@REM *****************************************<br />
@echo .<br />
@if exist FTPFIL.FTP del /Q FTPFIL.FTP &gt; NUL<br />
@if exist FTPFIL.LOG del /Q FTPFIL.LOG &gt; NUL<br />
@REM *****************************************<br />
@REM Build FTP script<br />
@REM *****************************************<br />
@echo .<br />
@echo Building FTP script<br />
@echo .<br />
@echo %user% &gt; FTPFIL.FTP<br />
@echo %pass% &gt;&gt; FTPFIL.FTP<br />
@echo %mode% &gt;&gt; FTPFIL.FTP<br />
@echo CD %aslib% &gt;&gt; FTPFIL.FTP<br />
@if &#8220;%putget%&#8221;==&#8221;put&#8221; echo put %pcfile%  %asfile% &gt;&gt; FTPFIL.FTP<br />
@if &#8220;%putget%&#8221;==&#8221;get&#8221; echo get %asfile%  %pcfile% &gt;&gt; FTPFIL.FTP<br />
@echo quit &gt;&gt; FTPFIL.FTP<br />
@REM *****************************************<br />
@REM Run the FTP script<br />
@REM *****************************************<br />
@FTP -s:FTPFIL.FTP %sysnam% &gt; FTPFIL.LOG<br />
@cls<br />
@REM *****************************************<br />
@REM Delete the FTP script IMPORTANT !<br />
@REM FTP script contains user and password !<br />
@REM *****************************************<br />
@if exist FTPFIL.FTP del /Q FTPFIL.FTP &gt; NUL<br />
@REM *****************************************<br />
@REM Send completion message<br />
@REM *****************************************<br />
@echo .<br />
@echo FTP session completed<br />
@echo .<br />
@goto end<br />
@REM<br />
@REM *****************************************<br />
@REM *** Error handling.                   ***<br />
@REM *****************************************<br />
@REM<br />
@REM *****************************************<br />
:nosysnam<br />
@echo .<br />
@echo AS400 system name not entered<br />
@echo Please try again<br />
@echo .<br />
@goto end<br />
@REM *****************************************<br />
:nouser<br />
@echo .<br />
@echo No user entered<br />
@echo Please try again<br />
@echo .<br />
@goto end<br />
@REM *****************************************<br />
:nopass<br />
@echo .<br />
@echo No password entered<br />
@echo Please try again<br />
@echo .<br />
@goto end<br />
@REM *****************************************<br />
:noputget<br />
@echo .<br />
@echo put or get must be entered<br />
@echo Please try again<br />
@echo .<br />
@goto end<br />
@REM *****************************************<br />
:nopcfile<br />
@echo .<br />
@echo PC file name not entered<br />
@echo Please try again<br />
@echo .<br />
@goto end<br />
@REM *****************************************<br />
:noaslib<br />
@echo .<br />
@echo AS400 library name not entered<br />
@echo Please try again<br />
@echo .<br />
@goto end<br />
@REM *****************************************<br />
:noasfile<br />
@echo .<br />
@echo AS400 file name not entered<br />
@echo Please try again<br />
@echo .<br />
@goto end<br />
@REM *****************************************<br />
:nomode<br />
@echo .<br />
@echo Transfer mode not entered<br />
@echo Enter ASCII or BIN<br />
@echo Please try again<br />
@echo .<br />
@goto end<br />
@REM *****************************************<br />
@REM *** End of program.                   ***<br />
@REM *****************************************<br />
@REM<br />
:end<br />
@pause<br />
:exit</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 6/9 queries in 0.013 seconds using memcached
Object Caching 268/271 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-22 22:48:23 -->