Jump to content

save dwg file to server folder


kalai

Recommended Posts

is it possible to save dwg file to server folder?

 

eg: (command "save" "http://www.domain.com//foldername//1.dwg")

 

help me.

 

regards

Kalai.

Link to comment
Share on other sites

This (command "save" "http://www.domain.com//foldername//1.dwg") indicated that you want to save to a folder in a website. I don’t think it’s possible because it has to be uploaded from the website

Could you be more detailed in your question? Is this on your personal server?

Link to comment
Share on other sites

To my knowledge, you need FTP access to perform such operation.

If I were in your shoes, I would search for a FTP client that work in console (DOS command prompt) and use it to upload the file on that location. You can write a small AutoLISP routine to save your drawing in a temporarily location and start that FTP client with the required parameters to perform the upload.

 

Regards,

Mircea

Link to comment
Share on other sites

Hi Mircea,

 

i could not understand that ftp client that work in console (DOS command prompt).

i donot want to upload file manually.

please explain in detail.

Link to comment
Share on other sites

You can find here information regarding FTP client applications; there is also a list with such tools.

One that can be used in console means that it can be started and used with parameters at DOS command line, without a Windows interface. This will make it suitable to be used from AutoLISP code. Should find a freeware or a commercial one, if applicable.

After, your code should look something like this:

 

(command "_SAVEAS" DWGVersion (setq MyTempFile (strcat (getvar "TEMPPREFIX") MyFileName)))
(command "_SHELL" "MyFTPCLient \load MyTempFile www.ftp.domain.com")

 

Regards,

Mircea

Link to comment
Share on other sites

also keep in mind that a webhost will requier a user name and password

if the user name and password gets out then you run the risk of hackers taking over the site

also check to see how much space the webhost allocates for the site

Link to comment
Share on other sites

Are you only using it as a back up resource ? Terrabyte drives are so cheap now put in pocket and take home this is good fire insurance. Also if resources permit copy to another computer this is fast and cheap yours falls over his is till going.

 

On a personal note boss sent me to a site computer failure fairly new had a tape drive installed. $100,000 question did you back it up to the tape drive, what do you think was the answer !

 

Ps if computers are going to stop working generally do at day 1-2 or up to 4 weeks else work forever.

Link to comment
Share on other sites

I'm not following. Are you saying that the eTransmit command can save it directly onto an HTML server? AFAIK the eTransmit simply packages the file(s) into a folder / ZIP / EXE, with an option of attaching it to a new email. If you can get it to save directly to the server, could you please show how?

 

BTW, most windows should already have a built-in command-line ftp client. This is an extract from the FTP.EXE file's help in WinXP:

Ftp

Transfers files to and from a computer running a File Transfer Protocol (FTP) server service such as Internet Information Services. Ftp can be used interactively or in batch mode by processing ASCII text files.

Syntax

 

ftp [-v] [-d] [-i] [-n] [-g] [-s:FileName] [-a] [-w:WindowSize] [-A] [Host]

Parameters

 

-v Suppresses the display of FTP server responses. -d Enables debugging, displaying all commands passed between the FTP client and FTP server. -i Disables interactive prompting during multiple file transfers. -n Suppresses the ability to log on automatically when the initial connection is made. -g Disables file name globbing. Glob permits the use of the asterisk (*) and question mark (?) as wildcard characters in local file and path names. For more information, see Ftp: Glob. -s:FileName Specifies a text file that contains ftp commands. These commands run automatically after ftp starts. This parameter allows no spaces. Use this parameter instead of redirection (

 

 

  • You must prefix ftp parameters with a hyphen (-) rather than a slash (/).
  • Ftp command-line parameters are case-sensitive.
  • This command is available only if the Internet Protocol (TCP/IP) protocol is installed as a component in the properties of a network adapter in shortcutCold.gifNetwork Connections.
  • Ftp can be used interactively. After it is started, ftp creates a subenvironment in which you can use ftp commands. You can return to the command prompt by typing the quit command. When the ftp subenvironment is running, it is indicated by the ftp > command prompt.
  • For more information about ftp subcommands, see Related Topics.
  • Ftp supports the use of IPv6 when the IPv6 protocol is installed. For more information, see IP version 6 and IPv6 applications.

Examples

 

To log on to the FTP server named ftp.example.microsoft.com, type the following command:

ftp ftp.example.microsoft.com

To anonymously log on to the FTP server named ftp.example.microsoft.com, type the following command:

ftp -A ftp.example.microsoft.com

To log on to the FTP server named ftp.example.microsoft.com and run the ftp commands contained in a file named Resynch.txt, type the following command:

ftp -s:resynch.txt ftp.example.microsoft.com

Link to comment
Share on other sites

Thanks, I should learn to read the help more fully. Can't remember when last I checked help on the SaveAs command :oops:

 

BTW, I know how to format the url to include for login username & password on a FTP. But how do you do that in http with a put-send instead the much less secure post-send. The reason most logins work on put-send (i.e. the login name & password are sent as streams to the server) is that those streams can be encrypted. While the post-send uses the loginname & password as part of the url: e.g. http://www.somesite.net/login.php?login=MyUserName&passw=MyPassWord

 

See why that's usually frowned on? That url is sent in open text over the internet and could very easily be picked up by nearly everyone. Even if your connection is https you have to login using the put method. Is there some other way you login? Or does the authentication dialog automatically pop-up?

Link to comment
Share on other sites

let me u explain in detail.

First u have to configure ftp settings.

 

  1. Click File menu ac.menuaro.gif Save As.At the command prompt, enter saveas.
  2. In the Save Drawing As dialog box, select FTP from the Places list.
  3. If you have not yet added the FTP site to the available FTP locations, click Tools ac.menuaro.gif Add/Modify FTP Locations and define the FTP location as described in To open an AutoCAD file from the Internet by browsing an FTP site.
  4. Double-click one of the FTP sites, and select a file.
  5. Select a file format from the Files of Type list. Click Save.

Now u can save to server folder from autocad prompt or from lisp using

(command "saveas" autocadversion  "ftp://www.domainname.com//foldername//dwgname.dwg") 

Link to comment
Share on other sites

I know that bit, that's basically setting up a connection in windows explorer. The problem is you have to set it up for each PC. What I was asking is to use the username & password directly in the url path, so you don't have to do that.

 

See for example this using ftp: http://www.cs.rutgers.edu/~watrous/user-pass-url.html

 

That way you can directly save to a ftp folder without needing to setup a specific login location on the PC. Especially when you use this inside a lisp - it works well, since all you need to do is run the lisp. If you use the pre-setup system it will fail if you haven't set it up yet.

 

What I'd like to know is how to do the same idea with http (without needing to setup a WebDav connection as per the ftp locations). Usually you don't have the UN/PassW in the url with http/https, so this is seldom an option, since it's not the default way of loging in through http.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...