Technology Questions

Go Back   Technology Questions > Software Questions > Operating System Questions > Windows XP

Windows XP Discuss the Microsoft Windows XP Operating System

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 01-17-2007, 12:30 PM
VitaminB
Newsgroup Contributor
 
Posts: n/a
ftp append text to a file

Hi Guys,

I want to write a batch file which gets a text file from an ftp server
and appends this to en existing text file. This works with the commands
ftp, open, get and then finally copy the new to the existing file.
BUT: I want to create a new file whenever no file (in the example:
C:\bla.txt) exists. How can I do this? Can I append/get directly with
an ftp command and if no file exists just create a new one?

open nsasasnnn.de
anonymous
get /cmm/bla.txt C:\bla_new.txt
quit
Call copy C:\bla.txt+C:\bla_new.txt C:\bla.txt /b

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 01-17-2007, 12:30 PM
  #2 (permalink)  
Old 01-17-2007, 01:30 PM
Marcin Domaslawski
Newsgroup Contributor
 
Posts: n/a
Re: ftp append text to a file

Hi,
Instead copy try to use:

type c:\bla_new.txt >> C:\bla.txt

Marcin Domaslawski


Uzytkownik "VitaminB" <hetmar@web.de> napisal w wiadomosci
news:1169065368.617022.114440@a75g2000cwd.googlegr oups.com...
> Hi Guys,
>
> I want to write a batch file which gets a text file from an ftp server
> and appends this to en existing text file. This works with the commands
> ftp, open, get and then finally copy the new to the existing file.
> BUT: I want to create a new file whenever no file (in the example:
> C:\bla.txt) exists. How can I do this? Can I append/get directly with
> an ftp command and if no file exists just create a new one?
>
> open nsasasnnn.de
> anonymous
> get /cmm/bla.txt C:\bla_new.txt
> quit
> Call copy C:\bla.txt+C:\bla_new.txt C:\bla.txt /b
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 01-17-2007, 02:00 PM
VitaminB
Newsgroup Contributor
 
Posts: n/a
Re: ftp append text to a file

Thanks!!! It work's...


Marcin Domaslawski wrote:
> Hi,
> Instead copy try to use:
>
> type c:\bla_new.txt >> C:\bla.txt
>
> Marcin Domaslawski
>
>
> Uzytkownik "VitaminB" <hetmar@web.de> napisal w wiadomosci
> news:1169065368.617022.114440@a75g2000cwd.googlegr oups.com...
> > Hi Guys,
> >
> > I want to write a batch file which gets a text file from an ftp server
> > and appends this to en existing text file. This works with the commands
> > ftp, open, get and then finally copy the new to the existing file.
> > BUT: I want to create a new file whenever no file (in the example:
> > C:\bla.txt) exists. How can I do this? Can I append/get directly with
> > an ftp command and if no file exists just create a new one?
> >
> > open nsasasnnn.de
> > anonymous
> > get /cmm/bla.txt C:\bla_new.txt
> > quit
> > Call copy C:\bla.txt+C:\bla_new.txt C:\bla.txt /b
> >


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Append to an Existing REG_SZ Value in Registry Using a .Reg File Ron Sochanski Windows XP 5 04-17-2007 03:15 PM
how to append a character? juanbabi@gmail.com Microsoft Office 3 04-02-2007 02:30 PM
Hyperlink to DMG file: file is opened as text in browser Christian Kirchhoff Apple Macintosh Hardware 1 02-06-2007 04:18 PM
unexpected file renames when editing a text file marks542004@yahoo.com Windows XP 2 02-03-2007 06:45 PM
How to save a folder and file list of a ftp server to a text file? D Windows XP 10 01-21-2007 02:00 PM


New To Technology Questions? Do You Need Help with Your Computer or Device? Do You Need Help with this site?

All times are GMT -8. The time now is 09:44 PM.


2003 - 2009 All Rights Reserved. Technology Questions

Search Engine Friendly URLs by vBSEO 3.3.0