borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2010 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (How to pull data from web page an insert in db)Next Topic (Check internet connection (modem) in Win9x) New Topic New Poll Post Reply
AndreaVB Forum : Internet Applications : How do i determine if the file exist online
Poster Message
Chidaz
Level: Whizz Kid


Registered: 29-06-2006
Posts: 15

Ads by Lake Quincy Media
icon How do i determine if the file exist online

I wrote a special project for another company, it uploads text files using ftp to the internet (that is working). Now the problem is when you run the program for the second time it overwrite the already exist files. Please help me to come up with a solution on how to check if the files exist or not.

This program runs on a timer, and extract data from database, create textfiles and ftp them. So i want to check if the text files exist before i extract data from the database. This program is in VB6

[Edited by Chidaz on 29-06-2006 at 10:57 AM GMT]

29-06-2006 at 08:54 AM
View Profile Send Email to User Show All Posts | Quote Reply
admin
Level: Administrator


Registered: 04-04-2002
Posts: 637
icon Re: How do i determine if the file exist online

I am not so familiar with FTP commands but I saw there is a DIR command that returns the list of the files in the current remote directory, you can use it as in dos by specifying special match pattern using wildchars or the exact name of a file

if you run the DIR command followed by the name of the file you'll see if the file already exists or not

i.e.

ftp> DIR TEST.TXT

I don't know the reply fromat of the FTP server but you'll surely be able to know if the file is already in the server

hope this helps,
let me know

____________________________
AndreaVB

29-06-2006 at 10:01 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
Chidaz
Level: Whizz Kid


Registered: 29-06-2006
Posts: 15
icon Re: How do i determine if the file exist online

I have tried to use the DIR command its not working. Anyway I have used the Microsoft Internet Control and it works!!!

[Edited by Chidaz on 30-06-2006 at 08:50 AM GMT]

30-06-2006 at 06:40 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Internet Applications : How do i determine if the file exist online
Previous Topic (How to pull data from web page an insert in db)Next Topic (Check internet connection (modem) in Win9x) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2010 Andrea Tincaniborder