February 24, 2021
Hot Topics:

Using the Internet Transfer Control: Part 3

  • 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

This article was originally published on November 20, 2002

Enterprise Development Update

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

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