 |
|
 |
Does anyone know how to upload a file to a folder in the ftp site?
Thanks
|
|
|
|
 |
|
 |
In Win XP if service pack 2 is installed, it turns on the firewall automatically. In such case we are not able to send or receive data from FTP location. It doesn’t even give any message or error return code. How to check whether firewall is on and the data is sent or not. Also can we send data to an ftp server with firewall on?
|
|
|
|
 |
|
 |
Add FTP into exception open required port. You can run any program provided you set rules into your firewall.
|
|
|
|
 |
|
 |
Did someone get this sample working?
My attempt stopped to the row where I was supposed to initialize the _pFtpConnection member variable.
I did add the member variables to the doc-class as been told in the article.
-noon-
|
|
|
|
 |
|
 |
i'm using win xp with vc 6.0, create sample project with dialog based and the upload part is working.
* a lot of people fail not because they lack knowledge of talent but because they quit *
|
|
|
|
 |
|
 |
As i want to modifiled my files' m_mtime after i used FTP to upload my files to a server.Because the MSDN said the function CFile::SetStatus(lpszFilename...) :lpszFilename cant not include the network name.How can i deal with the problem?
|
|
|
|
 |
|
 |
Dear all
I have written a FTP Client, which connects to FTP services on win-2000 Server. Method GetFtpConnection() is workin fine. But when I try GetFile() or OpenFile(), its returning an error code 12003, ERROR_SXS_ASSEMBLYNOTFOUND,Can any one enlighten me on how to solve this problem.
Thanks in Advance
Girish
|
|
|
|
 |
|
 |
I had the same problem with Error code 12003 and I thought I'd post my results here since this is one of the places Google took me to first when I was searching for an answer.
First off let me say I had some very strange results when I finally got it running again. The first time I ran the program I could download the file and all was well. Then I ran it again, and from there on GetFile would return an 12003 error.
The way I finally got it to run was adding these 2 lines before GetFile:
CFtpFileFind finder(m_pFtp);
BOOL bWorking = finder.FindFile("Automated/FtpUpdates.txt");
// Even though findfile returned false getfile worked!!!
if (m_pFtp->GetFile(_T("Automated/FtpUpdates.txt"),
szLocalFilename,
FALSE,
FILE_ATTRIBUTE_NORMAL,
FTP_TRANSFER_TYPE_BINARY))
Then after 2 runs of FindFile returning FALSE it started returning TRUE GetFile always worked (after I put in the 2 lines of code), even when FindFile returned FALSE
So now it's working but I'm still a little confused as to why.
Hope this helps someone
|
|
|
|
 |
|
 |
where can i get it from codeproject?
|
|
|
|
 |
|
 |
dat is a good question
|
|
|
|
 |
|
 |
I am using the uploading part of this code and it fails every time. What might I be doing wrong???
|
|
|
|
 |
|
 |
I have met the same problem.When my program attempts to upload the file(2.txt),it takes long time to execute and at last on the server there are two files ,"2.txt" and "2.txt.uploading",which are both empty.
Can anybody tell me how to solve the problem?Thanks.
|
|
|
|
 |
|
 |
Hi, I was trying to copy/move some file from Temporary Internet Files to some other directory. In my application I used function MoveFile("....\\Temporary Internet Files\\Banner.gif","....Cat.gif") but it doesn't work.
With some other directories it works fine. Why is Temporary Internet Files dir so special, and what function will nicely move file from Temp... to some other dir???
Please, help!!!
thanks.
|
|
|
|
 |
|
 |
No
Tim Smith
"Programmers are always surrounded by complexity; we can not avoid it... If our basic tool, the language in which we design and code our programs, is also complicated, the language itself becomes part of the problem rather that part of the solution."
Hoare - 1980 ACM Turing Award Lecture
|
|
|
|
 |
|
 |
Hi Stuard,
Yes, i know... I've been trying to do the same thing. The only thing that works is copying from the internet cache to some other directory. I suppose that works for you too? But anything else (like delete, rename...) in the temporary internet files directory does not work, indeed. Of course, this directory is a special system directory. And it is probably treated with special care by the OS. We're just looking for some way around it. And i'm sure it MUST be possible. Because internet explorer does it when you ask to delete temporary internet files. Not so?
I'm looking for a solution. And i'll keep you informed if i find something. Would you please do the same thing?
Bye!
Philippe
Philippe Dykmans
Software developpement
University of Antwerp
|
|
|
|
 |
|
 |
If I want download all remote files in a directory, I can use the class CFtpFindFile to get all remote files name (FindFile / FindNextFile), so I can use CFtpConnection::GetFile method to download each file.
But in this case I have a problem: the CFtpFindFile::FindNextFile method doesn't work if a remote file has some blanks in the filename.
How can I resolve this problem?
Thank you.
|
|
|
|
 |
|
 |
I have seen many programs that allow downloads with resume. If the connection breaks, the download can re-start from where it left off.
Could you apply the same principle to uploads?
Paresh Solanki
"To the world, you may be just one person, but to one person, you may be the world"
|
|
|
|
 |
|
 |
VGirish :
are there other ways to upload the documents ?
Some thing like a Dll residing on the WebServer and we invoking that DLL and passing the file contents to that DLl and that dll creates the file at web server .
Any idea ??
Abhishek Narula
"Learn to appreciate others ... World would appreciate you"
|
|
|
|
 |
|
 |
Hi,
Yes. There are other ways to do the same thing too. Infact , my current project is doing just that. But as we have a linux server, i have coded that server part in java and established a connection between java and vc++ through sockets and i send the document to a servelet thats residing on the server.
The servelet takes care of creating a file on the server and it can send it to multiple clients if required. I found this method easier rather than worrying how to do it in VC++ alone. But if you want it in vc++ alone, please give me some time to make a sample program for you as i am a bit busy these days.
All luck pal.
With warm regards,
V.Girish
|
|
|
|
 |
|
 |
Thanks V , Even I thought of a simple Socket programing can assist in doing this job, but then more than the effort required to communicate with the server , a effort is required to ensure the integerity of data .. you know all the Digital communication holes.
Also since we are sticking to Microsoft technologies so I would rather prefer some COM/DCOM way of doing the same.
Any way thanks for your guideline, and if you get time do write back about the sample app that you mentioned.
Abhishek Narula
"Learn to appreciate others ... World would appreciate you"
|
|
|
|
 |
|
 |
This is a nice idea, but as an article it kinda sucks moss.
Please have a look at other CodeProject articles for formatting
Please have a look at other CodeProject articles for article styles, in terms of laying out the information and presenting it (i.e. an introduction would be nice).
Also there are no examples !
Can you please fix up certain things like:
Add the following statement in your header file.
#include "afxinet.h"
Which header ? More than likely you'll want to put this in your stdafx.h, might want to explain why.
2) In your header file, add the following Member Variables
CFtpConnection *m_pFtpConnection;
CInternetSession m_Session;
Which header - you probably mean the App class for your MFC CWinApp class. Explaining this further would make it more clear.
Further explain that these are MFC classes that may (I'm not 100% sure though) requier you to work from an MFC based application, as opposed to a plain vanilla C++ app.
|
|
|
|
 |
|
 |
I've done a tiny bit of editing on it... Can't do much here as it's a work PC and it's all restricted.. and I'm really really
Nish on life [methinks]
"It's The Soapbox; topics are optional" Shog 9
|
|
|
|
 |