Enumerates the files and directories on the remote FTP host.
Creates a directory on the server.
object.AddElement(
dirName As String)
Entry.
This example creates the directory Regis.
’NSN example to print the details of files and directories on the remote host
set ftpmgr = createobject ("ucx:ftpfilemgr")
ftpmgr.server = "193.97.54.165"
ftpmgr.login ("User", "password")
set currentDir = ftpmgr.currentDir
set entries = currentDir.getchildren
set entry=entries.AddElement ("Regis")
print (entry.name &" " &entry.modifydate)
ftpmgr.logout()
Finds a file or directory by name.
object.Element(
entryName As String)
Entry. Returns the specified Entry object if present; otherwise, NULL.
The parameter, entryName, can be either the name of a file or the name of a directory.
This example finds the file log.txt.
’NSN example to print the details of files and directories on the remote host
set ftpmgr = createobject ("ucx:ftpfilemgr")
ftpmgr.server = "193.97.54.165"
ftpmgr.login ("User", "password")
set currentDir = ftpmgr.currentDir
set entries = currentDir.getchildren
set entry=entries.Element ("log.txt")
print (entry.name &" " &entry.modifydate)
ftpmgr.logout()
Retrieves a file from FTP host computer and transfers it to the local computer.
object.Get(
remoteFile As String,
[localFile As String],
[restart As Boolean],
[startPosition As Long],
[numBytes As Long])
Boolean. Returns TRUE if the Get operation is successful; otherwise, FALSE.
If the Web-based script is not authenticated to eDirectory with appropriate rights, an error is returned.
This example retrieves log.txt from the remote host and saves it to the local machine as logcopy.txt.
’NSN example to print the details of files and directories on the remote host
’Get a copy of log.txt from remote host and save it as logcopy.txt
set ftpmgr = createobject ("ucx:ftpfilemgr")
ftpmgr.server = "193.97.54.165"
ftpmgr.login ("User", "password")
set currentDir = ftpmgr.currentDir
set entries = currentDir.getchildren()
entries.Get ("log.txt", "logcopy.txt")
ftpmgr.logout()
Determines whether or not the collection contains any more Entry objects.
object.HasMoreElements()
None.
Boolean. Returns TRUE if the collection contains more Entry objects; otherwise, FALSE.
This HasMoreElements example determines whether or not the collection contains more Entry objects.
’NSN example to print the details of files and directories on the remote host
set ftpmgr = createobject ("ucx:ftpfilemgr")
ftpmgr.server = "193.97.54.165"
ftpmgr.login ("User", "password")
set currentDir = ftpmgr.currentDir
print (currentDir.Name)
set entries = currentDir.getchildren
entries.reset()
while (entries.hasmoreelements)
set Entry=entries.next
print (entry.name &" " &entry.modifydate)
wend
ftpmgr.logout()
Returns the next Entry object in the Entries collection.
object.Next()
None.
Entry. Returns the next Entry object in the collection.
This Next example returns the next Entry object in the collection.
’NSN example to print the details of files and directories on the remote host
set ftpmgr = createobject ("ucx:ftpfilemgr")
ftpmgr.server = "193.97.54.165"
ftpmgr.login ("User", "password")
set currentDir = ftpmgr.currentDir
print (currentDir.Name)
set entries = currentDir.getchildren
entries.reset
while (entries.hasmoreelements)
set Entry=entries.next
print (entry.name &" " &entry.modifydate)
wend
ftpmgr.logout()
Copies a local file to the remote FTP host.
object.Put(
localFile As String,
[remoteFile As String])
Boolean. Returns TRUE if the Put operation is successful; otherwise, FALSE.
If the Web-based script is not authenticated to eDirectory with appropriate rights, an error is returned.
This example copies localfl.txt from the local machine and saves it to the remote machine as localfl.txt.
’Copy a file from local machine to remote host
set ftpmgr = createobject ("ucx:ftpfilemgr")
ftpmgr.server = "193.97.54.165"
ftpmgr.login ("User", "password")
set currentDir = ftpmgr.currentDir
print (currentDir.Name)
set entries = currentDir.getchildren()
entries.Put ("localfl.txt")
ftpmgr.logout()
Deletes the specified Entry object from the collection.
object.RemoveElement(
entryName As String)
Boolean. Returns TRUE if the Entry object is successfully removed; otherwise, FALSE.
The entryName parameter can be either the name of a file or the name of a directory.
This example removes the file Regis from the collection.
’NSN example to remove a file on the remote host
set ftpmgr = createobject ("ucx:ftpfilemgr")
ftpmgr.server = "193.97.54.165"
ftpmgr.login ("User", "password")
set currentDir = ftpmgr.currentDir
set entries = currentDir.getchildren
entries.RemoveElement ("Regis")
ftpmgr.logout()
Resets the collection of Entry objects.
object.Reset()
None.
Void.
This example resets the collection of Entry objects.
’NSN example to print the details of files and directories on the remote host
set ftpmgr = createobject ("ucx:ftpfilemgr")
ftpmgr.server = "193.97.54.165"
ftpmgr.login ("User", "password")
set currentDir = ftpmgr.currentDir
print (currentDir.Name)
set entries = currentDir.getchildren
entries.reset
while (entries.hasmoreelements)
set Entry=entries.next
print (entry.name &" " &entry.modifydate)
wend
ftpmgr.logout()