how can i fetch the 1_attdat.log file from the time attendance machine into my local drive ?

Dani AI

Generated

's answer is a good starting point if the attendance unit actually exposes 1_attlog.dat as a network share. Before adding code, verify how the device publishes logs: some devices share a file via SMB, others push exports via FTP/HTTP or expose an SDK/API. If it is not a plain network share you will need the vendor's export method or SDK instead of trying to copy a file from a UNC path.

Quick troubleshooting checklist (run these from the machine that will perform the copy):

  • Test access in File Explorer (browse the share) or map it with credentials using net use to see if authentication is needed. See net use usage here: .
  • Use the device IP instead of hostname to rule out DNS/NetBIOS name issues.
  • Confirm both Share and NTFS permissions allow the account you will run the app under. If your app runs as a Windows Service or under LocalSystem it will not have network access — run it under a domain/user account or use explicit credentials.
  • If the device is writing the file while you read it, add a retry/backoff and handle sharing violations (file locked). Some devices provide a “export” button to get a stable copy.

If you want a programmatic .NET approach from VB.NET, use the framework file APIs rather than relying on shell copy. For reference see System.IO.File.Copy in the .NET docs: System.IO.File.Copy — Microsoft Docs. If SMB copying keeps failing, check whether the device requires older SMB versions (which may be disabled on modern Windows) or use the device's FTP/SDK export — those are often more reliable and supported.

If you still get an error, capture the exact exception or the net use output and include it when asking for more help.

how can i fetch the 1_attlog.dat file from the time attendance machine located on my network into my local drive ?
Thanks.

commented: Don't post the same question twice in one minute. EDIT the original post. -3
Dim objFSO As New FileSystemObject
Dim strSourceFilePath As String
Dim strDestFilePath As String

strSourceFilePath = "\\ComputerName\SharedLocationName\FolderPath\1_attlog.dat"
strDestFilePath = "C:\1_attlog.dat"

objFSO.CopyFile strSourceFilePath, strDestFilePath

Use FileSystemObject and copy the network file using CopyFile method by giving the complete network path of the file:

In the above given code snippet,
ComputerName ----> Name of the computer from which you want to copy the file.
SharedLocationName ----> Shared Folder name on the remote system.
FolderPath ----> Path of the folder in which the file is present.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.