Author Topic: ftp upload routine  (Read 7240 times)

0 Members and 1 Guest are viewing this topic.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: ftp upload routine
« Reply #15 on: May 17, 2017, 09:39:50 AM »
Code: [Select]
...  "ftp://user:password@ftp.domain.com//public//sites//www.domain.com//files//"...Is there some really special to consider?
Not really an issue no.
  • The first ftp:// simply states the protocol used.
  • The second is because the site's name contains it. Many sites use the same domain name and then a www prefix for their web pages and a ftp prefix for the ftp server.
  • The www portion (I'm assuming) is just a folder name in the ftp server's shared folders.
I have tried in a thousand ways and I have not managed to make it work, maybe some teacher can collaborate with some test, thanks :(
Something weird though ... that code uses double forward slashes. It may just the why this isn't working. You don't need to escape forward slashes, only backslashes. I.e. a "\\" is interpreted as a single \, but a / can simply be used as "/".

Other than that (and the rest of the things previously mentioned) I cannot think of why this shouldn't work. It should rather look like this:
"ftp://user:password@ftp.domain.com/public/sites/www.domain.com/files/"

Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

wkmvrij

  • Guest
Re: ftp upload routine
« Reply #16 on: May 19, 2017, 06:08:09 PM »
You tried:

(vla-putremotefile
       (vla-get-utility (vla-get-activedocument (vlax-get-acad-object)))
       "http://www.topowar.net/Otros"
       "c:\\leame.txt"
    )

From the Autodesk Helpfile on the complimentary function VLA-GETREMOTEFILE:
 

(setq doc (vla-get-ActiveDocument acadObj))

    (setq Utility (vla-get-Utility doc))   ;; Connect to Utility object
   
    ;; Prompt user for a URL to download. This should be a URL to an AutoCAD drawing file.



I never tried these functions myself, but it seems likely that they are selective of the type of files to be transferred
 

Andrea

  • Water Moccasin
  • Posts: 2372
Re: ftp upload routine
« Reply #17 on: May 30, 2017, 02:09:19 PM »
just curious....

why not trying to map a drive letter to this FTP....and then,...use vl-file-copy into it ?
Keep smile...

Peter2

  • Swamp Rat
  • Posts: 650
Re: ftp upload routine
« Reply #18 on: May 30, 2017, 03:56:50 PM »
Maybe it would work on internal usage, but I see problems if the function runs in a common routine on different, "foreign" PCs.
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

Andrea

  • Water Moccasin
  • Posts: 2372
Re: ftp upload routine
« Reply #19 on: May 30, 2017, 05:19:00 PM »
create a VBScript file..
https://www.example-code.com/vbscript/ftp_passiveUpload.asp

then,...call it from lisp... ?
Keep smile...

PKENEWELL

  • Bull Frog
  • Posts: 317
Re: ftp upload routine
« Reply #20 on: June 02, 2017, 04:57:17 PM »
"When you are asked if you can do a job, tell 'em, 'Certainly I can!' Then get busy and find out how to do it." - Theodore Roosevelt