473,320 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Comparing an ftp directory with a local directory

I'm trying to write a utility that will compare a local directory and
it's subdirectories with a directory on an ftp server.

The .net directory and file classes could be useful on the local side,
but I don't think I can use them for the ftp side, because all I will
have is a parsed list.

At this point I'm thinking of a custom VirtualFile class that has the
file/directory information such as: filename, filedate, filetime, type
(as in file or directory), permissions, etc. To do the comparison I'm
thinking of using a hashtable of VirtualFiles. As I move down the local
hashtable I can check if the file exists in the remote hashtable.

Any comments/ideas?

Thanks!
Aug 1 '07 #1
1 2880
deciacco wrote:
I'm trying to write a utility that will compare a local directory and
it's subdirectories with a directory on an ftp server.

The .net directory and file classes could be useful on the local side,
but I don't think I can use them for the ftp side, because all I will
have is a parsed list.

At this point I'm thinking of a custom VirtualFile class that has the
file/directory information such as: filename, filedate, filetime, type
(as in file or directory), permissions, etc. To do the comparison I'm
thinking of using a hashtable of VirtualFiles. As I move down the local
hashtable I can check if the file exists in the remote hashtable.
You will need to parse the FTP listing yourself. I may have some
code if you are interested.

You need to list and compare - if the directory listings are not
sorted, the Hashtable or Dictionary<string,FtpFileInfosounds as
a good solution.

Arne

Aug 2 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Dan Stromberg | last post by:
We will soon have 3 copies, for testing purposes, of what should be about 4.5 terrabytes of data. Rather than cmp'ing twice, to verify data integrity, I was thinking we could speed up the...
2
by: francescomoi | last post by:
Hi. I'm trying to build 'MySQL-python-1.2.0' on my Linux FC2: ---------------------------------- # export PATH=$PATH:/usr/local/mysql/bin/ # export mysqlclient=mysqlclient_r # python setup.py...
2
by: Jacky Luk | last post by:
Hi all, If I need to make a C# application, do I need to set up a virtual dir such as inetroot on the Harddisks. How do I set up such thingy? Thanks Jack
2
by: vduber6er | last post by:
First off this is in unix. I have a C file that has python embedded in it. In the script I have the following PyRun_SimpleString(code); where code = "import mymodule"
1
by: Richard | last post by:
Hi, I created a new directory on my WinXP-Pro/SP2 file system. Then I created a virtual directory in IIS pointing to that local directory. After completing that, I noticed that I had a...
2
by: Jon | last post by:
It appears that (windows) python searches in the current working directory before looking in the local site-packages directory, or that '.' comes first in sys.path? The problem arises when I made...
8
by: lawrence k | last post by:
I've installed Apache 1.3.36 on my Redhat EL 3 machine. Now I'm trying to install PHP 5.1.4. I can not get the ./configure command to work. I keep getting this error: configure: error: Invalid...
2
by: ZMY | last post by:
Hi all, I am installing python 2.2 on QNX4.25 but can't get it into /usr/local/ bin/ directory. Here is what I did: 1) untar Python-2.2 into directory /openqnx/Python-2.2/ 2) use command:...
6
by: gunjan29484 | last post by:
Hello, i want to compare the two directory structures and find out if any file or directory is missing in the second directory structure or not. (directory1 is a super set of directory2) I have...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.