![]() |
|
![]() |
| ChangeDirectory | Connect | DeleteFile | Disconnect |
| GetCurrentDirectoryName | GetFile | ListCurrentRemoteDirectory | MakeDirectory |
| PutFile | RemoveDirectory | RenameFile | SetLogStatus |
| SetMode |
PROCEDURE Connect
(CONST objectName : ARRAY OF CHAR;
CONST FtpServerName : ARRAY OF CHAR;
CONST userID : ARRAY OF CHAR;
CONST Password : ARRAY OF CHAR;
VAR Success : BOOLEAN);
(**
Connect - Connect to the remote ftp server. (Requires SageST_Objects.dll).
This procedure will connect to the remote ftp server. This is
required before any of the file actions can take place. Once
all file transfers or operations with the ftp server are complete
the disconnect routine should be called.
NOTE - If you define an FTP object in Thor and want to call
it from this package then you MUST have SageST_Objects.dll
in the directory with the program .EXE file or in the system's
search path. Also the DFL containing the object must be open.
Also note that the absolue minimum that you must pass is the
ObjectName, FtpServerName, UserID and Password or the routine
will fail.
When logging into an anonymous Ftp server the UserID must be set
to the value 'Anonymous' and the password will be the email address
of the sender. Please note that the UserID is almost always case
sensitive so when it is anonymous it must be spelled 'Anonymous'.
Please note that many servers will be Unix based and all UserID's,
passwords and filenames will be case sensitive. You MUST have an
understanding of the requirements for names for this routine to
succeed.
CALLING SEQUENCE -
Connect (ObjectName, FtpServerName, UserID, Password, Success)
ENTRY -
ObjectName : ARRAY OF CHAR
The name given the object when declared in Thor.
FtpServerName : ARRAY OF CHAR
The name of the FTP server to connect to. An IP address may also be used.
UserID : ARRAY OF CHAR
The ID of the user logging into the Ftp server.
Password : ARRAY OF CHAR
The password of the user logging into the Ftp server.
EXIT -
Success : BOOLEAN
TRUE - Connection was made.
FALSE - Some problem prevented the connection.
EXAMPLE -
ObjFtp.Connect ("MYFTP",
"some.good.server",
"abc",
"pass@word23",
Success);
*)
PROCEDURE Disconnect
(CONST objectName : ARRAY OF CHAR;
VAR Success : BOOLEAN);
(**
Disconnect - Disconnect from the remote ftp server. (Requires SageST_Objects.dll).
This procedure will disconnect from the remote ftp server. This is
required after completing all file actions.
NOTE - If you define an FTP object in Thor and want to call
it from this package then you MUST have SageST_Objects.dll
in the directory with the program .EXE file or in the system's
search path. Also the DFL containing the object must be open.
Also note that the absolue minimum that you must pass is the
ObjectName or the routine will fail.
Please note that many servers will be Unix based and all UserID's,
passwords and filenames will be case sensitive. You MUST have an
understanding of the requirements for names for this routine to
succeed.
CALLING SEQUENCE -
Disconnect (ObjectName, Success)
ENTRY -
ObjectName : ARRAY OF CHAR
The name given the object when declared in Thor.
EXIT -
Success : BOOLEAN
TRUE - Disconnection completed.
FALSE - Some problem prevented the disconnection.
EXAMPLE -
ObjFtp.Disconnect ("MYFTP",
Success);
*)
PROCEDURE PutFile
(CONST objectName : ARRAY OF CHAR;
CONST LocalFileName : ARRAY OF CHAR;
CONST RemoteFileName : ARRAY OF CHAR;
VAR Success : BOOLEAN);
(**
PutFile - Put file from local to remote machine. (Requires SageST_Objects.dll).
This procedure will ftp a file from the local to a remote machine.
NOTE - If you define an FTP object in Thor and want to call
it from this package then you MUST have SageST_Objects.dll
in the directory with the program .EXE file or in the system's
search path. Also the DFL containing the object must be open.
Also note that the absolue minimum that you must pass is the
ObjectName, LocalFileName and RemoteFileName or the routine
will fail.
Please note that many servers will be Unix based and all UserID's,
passwords and filenames will be case sensitive. You MUST have an
understanding of the requirements for names for this routine to
succeed.
CALLING SEQUENCE -
PutFile (ObjectName, LocalFileName, RemoteFileName, Success)
ENTRY -
ObjectName : ARRAY OF CHAR
The name given the object when declared in Thor.
LocalFileName : ARRAY OF CHAR
The name of the file being sent. This may include a path but
is not necessary. If a path is not provided it will use the
local directory.
RemoteFileName : ARRAY OF CHAR
The name of the file when it reaches the remote server. This
may include a path but is not necessary. If a path is not
provided it will use the local directory. By putting a different
name here you can change the name of the file as it is transferred.
EXIT -
Success : BOOLEAN
TRUE - File was uploaded successfully.
FALSE - Some problem prevented the file from being sent.
EXAMPLE -
ObjFtp.PutFile ("MYFTP",
"E:\LocalDir\TestFile.doc",
"/remotedir/TestFile.out",
Success);
*)
PROCEDURE GetFile
(CONST objectName : ARRAY OF CHAR;
CONST RemoteFileName : ARRAY OF CHAR;
CONST LocalFileName : ARRAY OF CHAR;
VAR Success : BOOLEAN);
(**
GetFile - Get a file from remote to local machine. (Requires SageST_Objects.dll).
This procedure will ftp a file from the remote to a local machine.
NOTE - If you define an FTP object in Thor and want to call
it from this package then you MUST have SageST_Objects.dll
in the directory with the program .EXE file or in the system's
search path. Also the DFL containing the object must be open.
Also note that the absolue minimum that you must pass is the
ObjectName, RemoteFileName and LocalFileName or the routine
will fail.
Please note that many servers will be Unix based and all UserID's,
passwords and filenames will be case sensitive. You MUST have an
understanding of the requirements for names for this routine to
succeed.
CALLING SEQUENCE -
GetFile (ObjectName, RemoteFileName, LocalFileName, Success)
ENTRY -
ObjectName : ARRAY OF CHAR
The name given the object when declared in Thor.
RemoteFileName : ARRAY OF CHAR
The name of the file that is on the remote server. This
may include a path but is not necessary. If a path is not
provided it will use the local directory.
LocalFileName : ARRAY OF CHAR
The name of the file being received. This may include a path but
is not necessary. If a path is not provided it will use the
local directory. By putting a different name here you can change
the name of the file as it is transferred.
EXIT -
Success : BOOLEAN
TRUE - File was downloaded successfully.
FALSE - Some problem prevented the file from being received.
EXAMPLE -
ObjFtp.PutFile ("MYFTP",
"/remotedir/TestFile.out",
"E:\LocalDir\TestFile.doc",
Success);
*)
PROCEDURE DeleteFile
(CONST objectName : ARRAY OF CHAR;
CONST RemoteFileName : ARRAY OF CHAR;
VAR Success : BOOLEAN);
(**
DeleteFile - Delete a file from the remote machine. (Requires SageST_Objects.dll).
This procedure will delete a file on a remote machine using ftp.
NOTE - If you define an FTP object in Thor and want to call
it from this package then you MUST have SageST_Objects.dll
in the directory with the program .EXE file or in the system's
search path. Also the DFL containing the object must be open.
Also note that the absolue minimum that you must pass is the
ObjectName and RemoteFileName or the routine will fail.
Please note that many servers will be Unix based and all UserID's,
passwords and filenames will be case sensitive. You MUST have an
understanding of the requirements for names for this routine to
succeed.
CALLING SEQUENCE -
DeleteFile (ObjectName, RemoteFileName, Success)
ENTRY -
ObjectName : ARRAY OF CHAR
The name given the object when declared in Thor.
RemoteFileName : ARRAY OF CHAR
The name of the file that is on the remote server. This
may include a path but is not necessary. If a path is not
provided it will use the local directory.
EXIT -
Success : BOOLEAN
TRUE - File was deleted successfully.
FALSE - Some problem prevented the file from being deleted.
EXAMPLE -
ObjFtp.DeleteFile ("MYFTP",
"/remotedir/TestFile.out",
Success);
*)
PROCEDURE RenameFile
(CONST objectName : ARRAY OF CHAR;
CONST RemoteFileName1 : ARRAY OF CHAR;
CONST RemoteFileName2 : ARRAY OF CHAR;
VAR Success : BOOLEAN);
(**
RenameFile - Rename a file on the remote machine. (Requires SageST_Objects.dll).
This procedure will rename a file on a remote machine using ftp.
NOTE - If you define an FTP object in Thor and want to call
it from this package then you MUST have SageST_Objects.dll
in the directory with the program .EXE file or in the system's
search path. Also the DFL containing the object must be open.
Also note that the absolue minimum that you must pass is the
ObjectName, RemoteFileName1 and RemoteFileName2 or the routine
will fail.
Please note that many servers will be Unix based and all UserID's,
passwords and filenames will be case sensitive. You MUST have an
understanding of the requirements for names for this routine to
succeed.
CALLING SEQUENCE -
RenameFile (ObjectName, RemoteFileName1, RemoteFileName2, Success)
ENTRY -
ObjectName : ARRAY OF CHAR
The name given the object when declared in Thor.
RemoteFileName1 : ARRAY OF CHAR
The name of the file that is now on the remote server. This
may include a path but is not necessary. If a path is not
provided it will use the local directory.
RemoteFileName2 : ARRAY OF CHAR
The new name for the file on the remote server. This
may include a path but is not necessary. If a path is not
provided it will use the local directory.
EXIT -
Success : BOOLEAN
TRUE - File was renamed successfully.
FALSE - Some problem prevented the file from being renamed.
EXAMPLE -
ObjFtp.RenameFile ("MYFTP",
"/remotedir/TestFile.out",
"/remotedir/NewName.out",
Success);
*)
PROCEDURE MakeDirectory
(CONST objectName : ARRAY OF CHAR;
CONST RemoteDirName : ARRAY OF CHAR;
VAR Success : BOOLEAN);
(**
MakeDirectory - Make a directory on the remote machine. (Requires SageST_Objects.dll).
This procedure will make a new directory on the remote machine
using ftp.
NOTE - If you define an FTP object in Thor and want to call
it from this package then you MUST have SageST_Objects.dll
in the directory with the program .EXE file or in the system's
search path. Also the DFL containing the object must be open.
Also note that the absolue minimum that you must pass is the
ObjectName and RemoteDirName or the routine will fail.
Please note that many servers will be Unix based and all UserID's,
passwords and filenames will be case sensitive. You MUST have an
understanding of the requirements for names for this routine to
succeed.
CALLING SEQUENCE -
MakeDirectory (ObjectName, RemoteDirName, Success)
ENTRY -
ObjectName : ARRAY OF CHAR
The name given the object when declared in Thor.
RemoteDirName : ARRAY OF CHAR
The name of the directory to make.
EXIT -
Success : BOOLEAN
TRUE - Directory was created successfully.
FALSE - Some problem prevented the directory from being created.
This can include the fact that the directory already existed.
EXAMPLE -
ObjFtp.MakeDirectory ("MYFTP",
"/newremotedir",
Success);
*)
PROCEDURE ChangeDirectory
(CONST objectName : ARRAY OF CHAR;
CONST RemoteDirName : ARRAY OF CHAR;
VAR Success : BOOLEAN);
(**
ChangeDirectory - Change current working directory on remote machine. (Requires SageST_Objects.dll).
This procedure will change the current working directory on a
remote ftp server.
NOTE - If you define an FTP object in Thor and want to call
it from this package then you MUST have SageST_Objects.dll
in the directory with the program .EXE file or in the system's
search path. Also the DFL containing the object must be open.
Also note that the absolue minimum that you must pass is the
ObjectName and RemoteDirName or the routine will fail.
Please note that many servers will be Unix based and all UserID's,
passwords and filenames will be case sensitive. You MUST have an
understanding of the requirements for names for this routine to
succeed.
CALLING SEQUENCE -
ChangeDirectory (ObjectName, RemoteDirName, Success)
ENTRY -
ObjectName : ARRAY OF CHAR
The name given the object when declared in Thor.
RemoteDirName : ARRAY OF CHAR
The name of the directory to change to.
EXIT -
Success : BOOLEAN
TRUE - Directory was changed successfully.
FALSE - Some problem prevented the directory from being changed.
EXAMPLE -
ObjFtp.ChangeDirectory ("MYFTP",
"/newremotedir",
Success);
*)
PROCEDURE RemoveDirectory
(CONST objectName : ARRAY OF CHAR;
CONST RemoteDirName : ARRAY OF CHAR;
VAR Success : BOOLEAN);
(**
RemoveDirectory - Remove a directory on remote machine. (Requires SageST_Objects.dll).
This procedure will remove a directory on a remote ftp server.
NOTE - If you define an FTP object in Thor and want to call
it from this package then you MUST have SageST_Objects.dll
in the directory with the program .EXE file or in the system's
search path. Also the DFL containing the object must be open.
Also note that the absolue minimum that you must pass is the
ObjectName and RemoteDirName or the routine will fail.
Please note that many servers will be Unix based and all UserID's,
passwords and filenames will be case sensitive. You MUST have an
understanding of the requirements for names for this routine to
succeed.
CALLING SEQUENCE -
RemoveDirectory (ObjectName, RemoteDirName, Success)
ENTRY -
ObjectName : ARRAY OF CHAR
The name given the object when declared in Thor.
RemoteDirName : ARRAY OF CHAR
The name of the directory to remove.
EXIT -
Success : BOOLEAN
TRUE - Directory was removed successfully.
FALSE - Some problem prevented the directory from being removed.
This can include the fact that the directory was not empty.
EXAMPLE -
ObjFtp.RemoveDirectory ("MYFTP",
"/oldremotedir",
Success);
*)
PROCEDURE ListCurrentRemoteDirectory
(CONST objectName : ARRAY OF CHAR;
CONST TypeOfList : ListType;
CONST ListCriteria : ARRAY OF CHAR;
CONST ListProc : ListProcType;
VAR Success : BOOLEAN);
(**
ListCurrentRemoteDirectory - List contents of directory (Requires SageST_Objects.dll).
This procedure will list the contents of the current remote directory
on an ftp server. The results come back one at a time to the ListProc
in a record structure. Inside the proc you can perform actions on the
file such as rename, get or delete. You can restrict the number of
names that are returned to you by using the ListCriteria entry.
Wildcard characters are allowed so you can ask for list that are
restricted to something like all '*.dat' files. If you want to see the
entire contents of the directory then you should use '*.*' as the
criteria.
NOTE - If you define an FTP object in Thor and want to call
it from this package then you MUST have SageST_Objects.dll
in the directory with the program .EXE file or in the system's
search path. Also the DFL containing the object must be open.
Also note that the absolue minimum that you must pass is the
ObjectName and ListCriteria or the routine will fail.
Please note that many servers will be Unix based and all UserID's,
passwords and filenames will be case sensitive. You MUST have an
understanding of the requirements for names for this routine to
succeed.
CALLING SEQUENCE -
ListCurrentRemoteDirectory (ObjectName, TypeOfList, ListCriteria,
ListProc, Success)
ENTRY -
ObjectName : ARRAY OF CHAR
The name given the object when declared in Thor.
TypeOfList : ListType
Determines the amount of information to be returned in the callback
routine. NameOnlyList returns just the name found. AllDataList
returns other information such as the date and time, size and
possibly the attributes of the file. The format of the line and the
layout of the information is totally dependent upon the server you are
connected to.
ListCriteria : ARRAY OF CHAR
The criteria to use for matching names to return. If the TypeOfList
requested is AllDataList this parameter will become *.* no matter what
you pass in since I don't know what format is used by the server you are
connected to and hence can't parse the name out. If you use NameOnlyList
for the type then I will check it against this wildcard.
ListProc : ListProcType
The routine to call back with a matching name.
EXIT -
Success : BOOLEAN
TRUE - List of any matching names was returned.
FALSE - Some problem prevented the list from being returned.
EXAMPLE -
ObjFtp.ListCurrentRemoteDirectory ("MYFTP",
ObjFtp.AllDataList,
"*.*",
MyListProc,
Success);
*)
PROCEDURE SetMode
(CONST objectName : ARRAY OF CHAR;
CONST NewMode : ModeType;
VAR Success : BOOLEAN);
(**
SetMode - Set the mode of transfer to Ascii or Binary (Requires SageST_Objects.dll).
This procedure will set the mode of subsequent transfers. The choices
are between an Ascii mode or Binary mode. Once set this will be the mode
used until it is changed or until the Disconnect routine is called. After
disconnecting and reconnecting the mode will be reset to the default.
NOTE - If you define an FTP object in Thor and want to call
it from this package then you MUST have SageST_Objects.dll
in the directory with the program .EXE file or in the system's
search path. Also the DFL containing the object must be open.
Also note that the absolue minimum that you must pass is the
ObjectName or the routine will fail.
Please note that many servers will be Unix based and all UserID's,
passwords and filenames will be case sensitive. You MUST have an
understanding of the requirements for names for this routine to
succeed.
CALLING SEQUENCE -
SetMode (ObjectName, NewMode, Success)
ENTRY -
ObjectName : ARRAY OF CHAR
The name given the object when declared in Thor.
NewMode : ModeType
The mode used for file transfers (Ascii or Binary)
EXIT -
Success : BOOLEAN
TRUE - The mode was changed to the requested type.
FALSE - Some problem prevented the mode from being set.
EXAMPLE -
ObjFtp.SetMode ("MYFTP",
ObjFtp.AsciiType,
Success);
*)
PROCEDURE SetLogStatus
(CONST objectName : ARRAY OF CHAR;
CONST LogActive : BOOLEAN;
VAR Success : BOOLEAN);
(**
SetLogStatus - Set whether a log prints during the FTP calls. (Requires SageST_Objects.dll).
This procedure sets the status of whether a log of the FTP commands is printed
during processing. If active the log will be a file called FTPCMDS.LOG. This will
have entries that let you trace the workings of the various FTP calls. The
default value is for the log to NOT be active.
NOTE - If you define an FTP object in Thor and want to call
it from this package then you MUST have SageST_Objects.dll
in the directory with the program .EXE file or in the system's
search path. Also the DFL containing the object must be open.
Also note that the absolue minimum that you must pass is the
ObjectName or the routine will fail.
Please note that many servers will be Unix based and all UserID's,
passwords and filenames will be case sensitive. You MUST have an
understanding of the requirements for names for this routine to
succeed.
CALLING SEQUENCE -
SetLogStatus (ObjectName, LogActive, Success)
ENTRY -
ObjectName : ARRAY OF CHAR
The name given the object when declared in Thor.
LogActive : BOOLEAN
TRUE - A log file will be generated by the commands.
FALSE - No log file will be generated by the commands.
EXIT -
Success : BOOLEAN
TRUE - The log status was set.
FALSE - Some problem prevented the log status from being set.
EXAMPLE -
ObjFtp.SetLogStatus ("MYFTP",
TRUE,
Success);
*)
PROCEDURE GetCurrentDirectoryName
(CONST objectName : ARRAY OF CHAR;
VAR Directory : ARRAY OF CHAR;
VAR Success : BOOLEAN);
(**
GetCurrentDirectoryName - Gets the name of the current remote directory. (Requires SageST_Objects.dll).
This procedure gets the name of the current directory on the
remote Ftp server.
Special note - This routine may give varying results. On one server
that this was tested on the first time this routine was called the
return value was '/' which would be the directory where it first
connected. However after changing to another directory and then
changing back to the starting directory it returned '/MainDir'
although it was in the same directory.
NOTE - If you define an FTP object in Thor and want to call
it from this package then you MUST have SageST_Objects.dll
in the directory with the program .EXE file or in the system's
search path. Also the DFL containing the object must be open.
Also note that the absolue minimum that you must pass is the
ObjectName or the routine will fail.
Please note that many servers will be Unix based and all UserID's,
passwords and filenames will be case sensitive. You MUST have an
understanding of the requirements for names for this routine to
succeed.
CALLING SEQUENCE -
GetCurrentDirectoryName (ObjectName, Directory, Success)
ENTRY -
ObjectName : ARRAY OF CHAR
The name given the object when declared in Thor.
EXIT -
ObjectName : ARRAY OF CHAR
The name given the object when declared in Thor.
Success : BOOLEAN
TRUE - The directory name was retrieved.
FALSE - Some problem prevented the retrieval of the directory name.
EXAMPLE -
ObjFtp.GetCurrentDirectoryName ("MYFTP",
DirectoryName,
Success);
*)
Send mail to
warren.merrill@inl.gov
with questions or comments about this web site.
Copyright © 1989-2006 Battelle Energy Alliance