Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How can i do XP Dosbox: ftp dir >c:\dir.txt

170 views
Skip to first unread message

Carsten Beckermann

unread,
Nov 22, 2008, 7:36:26 AM11/22/08
to
Hello

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


foxidrive

unread,
Nov 22, 2008, 7:44:12 AM11/22/08
to
On Sat, 22 Nov 2008 13:36:26 +0100, "Carsten Beckermann"
<carstenbec...@web.de> wrote:

>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

Timo Salmi

unread,
Nov 22, 2008, 1:02:37 PM11/22/08
to
Carsten Beckermann <carstenbec...@web.de> wrote:
> 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.

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

Carsten Beckermann

unread,
Nov 22, 2008, 4:21:58 PM11/22/08
to

"Carsten Beckermann" <carstenbec...@web.de> schrieb im Newsbeitrag
news:gg8ucc$t88$02$1...@news.t-online.com...

> Hello
>
> 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.
>

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


Timo Salmi

unread,
Nov 23, 2008, 4:13:27 AM11/23/08
to
Carsten Beckermann <carstenbec...@web.de> wrote:
> 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

Good catch!

Timo Salmi

unread,
Nov 23, 2008, 5:19:09 AM11/23/08
to
Carsten Beckermann <carstenbec...@web.de> wrote:
> In that line, there is no need for an arrow to send the output into the
> textfile.
>
> Again, thank You all for Your ideas.

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

0 new messages