Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2014-11-27
8
Medium Priority
?
257 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 600 total points
ID: 40470042
You can also improvise on this
File Activity Tracker
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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
 

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 1400 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Make the most of your online learning experience.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Starting up a Project

715 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