dcsimg
July 15, 2018
Hot Topics:

Using the Internet Transfer Control: Part 3

  • November 19, 2002
  • By Sam Huggill
  • Send Email »
  • More Articles »

This starts to get a bit simpler, because it is mainly a case of using the Execute command.

The syntax of the PUT command is as follows:

PUT localfile, remotefile

Here is a sample:

Inet1.Execute ,"PUT c:\myfile.txt /myfile.txt"

(Remember to include that preceeding '/')

To download a file, use the GET command:

GET remotefile, localfile
Inet1.Execute ,"GET myfile.txt c:\myfile.txt"

To delete a file, you need to use the DELETE command:

DELETE remotefile
Inet1.Execute ,"DELETE myfile.txt"

And finally, renaming a file can be done using, yes, you guessed it the RENAME command:

RENAME oldname,newname
Inet1.Execute ,"RENAME myfile.txt mynewfile.txt"

OK. Now that we have finsihed with files, lets move onto directories.

When handling directories, we need to add and delete them. For DOS gurus, this should be like the good old days! Simply use the MKDIR and RMDIR to make and remove directories. You should be aware of the syntax for both of these commands:

Pretty simple, but you must remember to place the / in at the correct places, otherwise you will have problems.





Page 5 of 6



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

By submitting your information, you agree that developer.com may send you developer offers via email, phone and text message, as well as email offers about other products and services that developer believes may be of interest to you. developer will process your information in accordance with the Quinstreet Privacy Policy.

Sitemap

Thanks for your registration, follow us on our social networks to keep up-to-date