altariamx2003
asked on
detect the size of a file when it is copied to a external device
I would like to know if you have an example of perhaps an advice about how to detect the size of a file when it is copied to an external device like a usb or external hard disk.
Best regards
Best regards
As it is the same size as that on your local hard disc (because copy isn't changing the file contents) maybe you ought to rethink your question. You want something but it isn't clear what you want to know.
You can determine the file size by using fileinfo. code example
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi altariamx2003,
Public Class FileSize
Public Shared Sub Main
Dim fileDetails As IO.FileInfo
fileDetails = My.Computer.FileSystem.Get FileInfo(" test.txt")
Console.WriteLine("Size: " & fileDetails.Length & " byte(s)")
End Sub
End Class
Public Class FileSize
Public Shared Sub Main
Dim fileDetails As IO.FileInfo
fileDetails = My.Computer.FileSystem.Get
Console.WriteLine("Size: " & fileDetails.Length & " byte(s)")
End Sub
End Class
ASKER
You are right AndyAinscow let me try to explain a little better
In this new project I need to do a program that track or monitor if the user plug an external device (usb, external disk drive, etc....) to a computer and try to copy any file to the external device plugged, the program need to send an internal alert(a email to somebody) about this issue.
I hope this help
I really dont have a clue hehehehe, and i dont know how to start
Any advice will appreciated
Thanks
In this new project I need to do a program that track or monitor if the user plug an external device (usb, external disk drive, etc....) to a computer and try to copy any file to the external device plugged, the program need to send an internal alert(a email to somebody) about this issue.
I hope this help
I really dont have a clue hehehehe, and i dont know how to start
Any advice will appreciated
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can use this too:
http://www.solarwinds.com/log-event-manager.aspx
We use it here,
It works in Windows, Mac, and Linux..
http://www.solarwinds.com/log-event-manager.aspx
We use it here,
It works in Windows, Mac, and Linux..
ASKER
Sorry for the delay