XP SP3 Dosbox
ftp client in Windows can show me the DIR of a ftp folder.
Switching to FTP mode by typing FTP in the dosbox
Under FTP, a "dir >C:\dir.txt" does not work for me.
How can i send that output to a txt File?
I want to get the directory listing into a textfile.
Any ideas?
Greetings
Carsten
>XP SP3 Dosbox
>
>ftp client in Windows can show me the DIR of a ftp folder.
>Switching to FTP mode by typing FTP in the dosbox
>
>Under FTP, a "dir >C:\dir.txt" does not work for me.
>How can i send that output to a txt File?
>I want to get the directory listing into a textfile.
Create an FTP script to log in, do the dir and log out, and use the script
syntax:
FTP -s:script.txt >c:\dir.txt
An example of getting the listing of Garbo's /pc/ts directory
@echo off & setlocal enableextensions
set scr_=%temp%\ftp$$$.tmp
set log_=%temp%\ftp.log
> "%scr_%" echo verbose
>>"%scr_%" echo open garbo.uwasa.fi
>>"%scr_%" echo anonymous
>>"%scr_%" echo my...@mypc.mydomain
>>"%scr_%" echo cd /pc/ts
>>"%scr_%" echo verbose
>>"%scr_%" echo ls -lF
>>"%scr_%" echo verbose
>>"%scr_%" echo quit
ftp -s:"%scr_%">"%log_%"
type "%log_%"
for %%f in ("%scr_%" "%log_%") do if exist %%f del %%f
endlocal & goto :EOF
If you wish to keep the directory listing, naturally don't delete the
log_ file.
All the best, Timo
--
Prof. Timo Salmi mailto:t...@uwasa.fi ftp & http://garbo.uwasa.fi/
Hpage: http://www.uwasa.fi/laskentatoimi/english/personnel/salmitimo/
Department of Accounting and Finance, University of Vaasa, Finland
Useful CMD script tricks http://www.netikka.net/tsneti/info/tscmd.htm
Hello
Thank You all for Your help.
I found out, that in my case, the DIR command of the XP DOS FTP Client have
an own output function:
dir mydirectory c:\directory.txt
That line will dir the FTP folder MYDIRECTORY into the local txt file
c:\directory.txt.
In that line, there is no need for an arrow to send the output into the
textfile.
Again, thank You all for Your ideas.
Greetings
Carsten
Good catch!
And thank you. The discussion has now been utilized in the updated
84} How can I automate downloading files from an ftp-site?
http://www.netikka.net/tsneti/info/tscmd084.htm