1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

copy /g /u "http://...dropbox.com/..." not working

Discussion in 'Support' started by Charles G, Apr 28, 2011.

  1. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,005
    Likes Received:
    0
    c:\copy /g /u "http://dl.dropbox.com/u/14823386/winapp2.ini" "C:\Program Files\CCleaner\DB_winapp2.ini"

    The "/u" option does not work; Tried with v8 to 12.1 (latest builds). Does /u work on http copies at all?

    I looked at www.dropbox.com and can't tell what type of servers they use...

    TCC 12.10.63 Windows XP [Version 5.1.2600]
    TCC Build 63 Windows XP Build 2600 Service Pack 3
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,729
    Likes Received:
    80
    /U cannot work on HTTP servers, as it is not possible to get the file time on HTTP files.
     
  3. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,005
    Likes Received:
    0
    Why then is an error message not given? Also thank you Rex for answering
    ----- Original Message -----
    From: rconn
    To: CSGalloway@nc.rr.com
    Sent: Thursday, April 28, 2011 08:13 AM
    Subject: RE: [Support-t-2806] Re: copy /g /u "http://...dropbox.com/..." not working


    Quote:
    Originally Posted by Charles G
    c:\copy /g /u "http://dl.dropbox.com/u/14823386/winapp2.ini" "C:\Program Files\CCleaner\DB_winapp2.ini"

    The "/u" option does not work; Tried with v8 to 12.1 (latest builds). Does /u work on http copies at all?

    /U cannot work on HTTP servers, as it is not possible to get the file time on HTTP files.
     
  4. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,729
    Likes Received:
    80
    Because the option processing is about 5 levels removed from the HTTP copy, and there's no way the parser can jump ahead to determine what you're actually trying to do.

    You cannot do a DIR on an HTTP directory (or get any file info at all); this is an HTTP standard limitation and there's not anything that TCC can do about it. If you can access the directory via FTP, do that instead.
     
  5. Kachupp

    Joined:
    Aug 9, 2009
    Messages:
    133
    Likes Received:
    0
    the warning is in the help chm



     
  6. Steve Pitts

    Joined:
    Jul 7, 2008
    Messages:
    158
    Likes Received:
    0
    Would it not be possible to use the Last-Modified header field, if present?? (I realise that it isn't a required field, and therefore you would have to revert to the current behaviour if it wasn't included, but if it was then it would seem like it should suffice)
     
  7. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,729
    Likes Received:
    80
    Four problems with that:

    1) I'd have to write a custom parser for any command that referenced HTTP, because it would have to be done at a different level than the current "find files" code. This would probably take at least a couple of months.

    2) The IPWorks code doesn't support it, so I'd have to write my own HTTP classes. Add another couple of months.

    3) Most of the HTTP servers I've looked at don't use it.

    4) It cannot work with any wildcards, because I cannot query the directory on an HTTP server. I'd already have to know the exact filename.

    And the bonus issue:

    5) Unless you have a really large file, it is faster to simply always do a put rather than trying to find the date and doing a compare.
     
  8. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,005
    Likes Received:
    0
    Dropbox doesn't allow FTP access - appearently. I can read the file using line[] and compare against the last stored version

    The file is to add additional entires to CCleaner, what I use to clean junk files of any computer I work on. It's of the form:

    ================= BOF
    ; Application Cleaning files
    ;
    ; Version: v1.0.110227
    ; Notes
    ; # of entries: 460
    ...
    ================= EOF

    the 110227 would be of the YYMMDD format.... The rest would be fairly simple
    ----- Original Message -----
    From: rconn
    To: CSGalloway@nc.rr.com
    Sent: Thursday, April 28, 2011 03:30 PM
    Subject: RE: [Support-t-2806] Re: copy /g /u "http://...dropbox.com/..." not working


    Quote:
    Originally Posted by Charles G
    Why then is an error message not given?

    Because the option processing is about 5 levels removed from the HTTP copy, and there's no way the parser can jump ahead to determine what you're actually trying to do.

    You cannot do a DIR on an HTTP directory (or get any file info at all); this is an HTTP standard limitation and there's not anything that TCC can do about it. If you can access the directory via FTP, do that instead.
     
  9. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,005
    Likes Received:
    0
    re: #3: How would I find out what software a particular HTTP server uses? Or if they have a FTP access that may or may not be documented...?
    ----- Original Message -----
    From: rconn
    To: CSGalloway@nc.rr.com
    Sent: Friday, April 29, 2011 10:21 AM
    Subject: RE: [Support-t-2806] Re: copy /g /u "http://...dropbox.com/..." not working


    Quote:
    Originally Posted by Steve Pitts
    Would it not be possible to use the Last-Modified header field, if present?? (I realise that it isn't a required field, and therefore you would have to revert to the current behaviour if it wasn't included, but if it was then it would seem like it should suffice)

    Four problems with that:

    1) I'd have to write a custom parser for any command that referenced HTTP, because it would have to be done at a different level than the current "find files" code. This would probably take at least a couple of months.

    2) The IPWorks code doesn't support it, so I'd have to write my own HTTP classes. Add another couple of months.

    3) Most of the HTTP servers I've looked at don't use it.

    4) It cannot work with any wildcards, because I cannot query the directory on an HTTP server. I'd already have to know the exact filename.

    And the bonus issue:

    5) Unless you have a really large file, it is faster to simply always do a put rather than trying to find the date and doing a compare.
     
  10. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,784
    Likes Received:
    29
    On Fri, 29 Apr 2011 14:17:14 -0400, Charles G <> wrote:

    |re: #3: How would I find out what software a particular HTTP server uses?

    If you can packet-sniff, it's usually given in the first HTTP response.
    Lucky.syr.edu uses Serv-U (FTP) which has a little HTTP server in it. It's
    first HTTP response includes this.

    Code:
    0x0030:  2032 3030 2048 5454 5020 4f4b 0d0a 5365  .200.HTTP.OK..Se
    0x0040:  7276 6572 3a20 5365 7276 2d55 2f31 302e  rver:.Serv-U/10.
    0x0050:  352e 302e 3131 0d0a 4461 7465 3a20 4672  5.0.11..Date:.Fr
    Winpcap/windump provide a free, easy, console packet-sniffer. MS's NetMon is
    also now readily available; it's GUI and relatively hard to learn.

    And the server might identify itself in the HTML itself. Buried in "TYPE
    http://lucky.syr.edu" is "Serv-U from RhinoSoft.com".
     

Share This Page