Name Property
Sets or returns the name of a specified file or folder. Read/write.
object.Name [= newname]
Arguments
object
Required. Always the name of a File or Folder object.
newname
Optional. If provided, newname is the new name of the specified object.
Remarks
The following code illustrates the use of the Name property:
Function ShowFileAccessInfo(filespec)
Dim fso, f, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFile(filespec)
s = f.Name & " on Drive " & UCase(f.Drive) & "<BR>"
s = s & "Created: " & f.DateCreated & "<BR>"
s = s & "Last Accessed: " & f.DateLastAccessed & "<BR>"
s = s & "Last Modified: " & f.DateLastModified
ShowFileAccessInfo = s
End Function
-----------------------
Also to retrieve a file, you can use the GetFile method, just give it a path
whether
its UNC or a direct path like C:\Winnt\File.exe. From there you can use the
Move, Copy and
other methods that are available.
Good luck..
Quote:
> I'm relatively new to VB but have written several other languages. I'm
> trying to build a simple client side app that just retrieves specific
files
> from different machines in the workgroup, renames them, zips everything
up,
> and notifies the user of success or failure. I'm fairly certain that
> FileSystem Object can do all of those things with its methods, however I
> have not seen a method or example of how to rename a file, or how to
> retrieve files from other machines on the network. Any help would be
> appreciated. Thanks.
> Steve