Solved

detect the size of a file when it is copied to a external device

Posted on 2014-11-27
8
235 Views
Last Modified: 2014-12-03
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
0
Comment
Question by:altariamx2003
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 40470024
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.
0
 
LVL 9

Expert Comment

by:teebon
ID: 40470039
You can determine the file size by using fileinfo. code example
0
 
LVL 9

Assisted Solution

by:teebon
teebon earned 150 total points
ID: 40470042
You can also improvise on this
File Activity Tracker
0
 
LVL 21

Expert Comment

by:Tapan Pattanaik
ID: 40470157
Hi altariamx2003,

Public Class  FileSize
    Public Shared Sub Main
   
        Dim fileDetails As IO.FileInfo


        fileDetails = My.Computer.FileSystem.GetFileInfo("test.txt")

        Console.WriteLine("Size: " & fileDetails.Length & " byte(s)")
    End Sub

End Class
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:altariamx2003
ID: 40470515
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
0
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 350 total points
ID: 40470519
I think the following is what you want:
http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher%28v=vs.110%29.aspx
A FileSystemWatcher.  There are links to examples of the various functions provided by that class.
0
 
LVL 6

Expert Comment

by:Rob G
ID: 40470529
You can use this too:
http://www.solarwinds.com/log-event-manager.aspx

We use it here,
It works in Windows, Mac, and Linux..
0
 

Author Comment

by:altariamx2003
ID: 40479892
Sorry for the delay
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

This is an explanation of a simple data model to help parse a JSON feed
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now