1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Automated file transfer according to simple rules

Discussion in 'All Other Software' started by TechUserCJ, May 5, 2009.

Thread Status:
Not open for further replies.
Advertisement
  1. TechUserCJ

    TechUserCJ Thread Starter

    Joined:
    Apr 20, 2009
    Messages:
    7
    Hello,

    I have a question concerning a simple task that I have to accomplish that I would like to use a program of some sort to help automate. There are two directories (let's call them Dir1 and Dir2). I want to copy files from Dir1 to Dir2, but there are some files in Dir1 that are also in Dir2 (i.e. they have the same names, not necessarily the same contents).
    I want to replace the files based on two simple rules:

    1. Keep the file that is larger.
    2. If the files are of equal size (this happens quite often), keep the newer one.

    Copying hundreds of files according to these simple rules is very tedious to do manually. Is there a program that anyone is aware of that will automate this task? I notice that the replace dialog in Filezilla includes considerations such as these, but you can't apply both these considerations at once in a prioritized, automated fashion.

    I would greatly appreciate any advice that anyone has to give.

    Thanks.
     
  2. midders

    midders Account Closed

    Joined:
    Dec 31, 1969
    Messages:
    645
    I'd write a program to do it; it's a fairly simple task in most langauages. If you're not a programmer and have no desire to learn, then maybe ask a techie friend?

    Sláinte

    midders
     
  3. TechUserCJ

    TechUserCJ Thread Starter

    Joined:
    Apr 20, 2009
    Messages:
    7
    Thanks for your reply. The only programming language I'm somewhat familiar with is VB6. Do you have any tips for accomplishing this task in VB6? Specifically, what commands do I use to access the file attributes (e.g. size, date modified)? Would I be working with straightforward text, or would the attribute information be encoded somehow? And what functions would I call to actually copy the files?
     
  4. stantley

    stantley

    Joined:
    May 22, 2005
    Messages:
    7,091
    You could use AutoHotkey to run Filezilla and send mouse clicks or keystrokes. AutoHotkey is a scripting program but it's easy enough for the average user to learn.
     
  5. midders

    midders Account Closed

    Joined:
    Dec 31, 1969
    Messages:
    645
    FileDateTime, FileLen, and FileCopy are the ones to use. Google is your friend.

    Sláinte

    midders
     
  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/824619

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice