Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. how to get copied files from windows to my application ??

how to get copied files from windows to my application ??

Scheduled Pinned Locked Moved C#
questiontutorial
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ahmedhassan96
    wrote on last edited by
    #1

    hi every body i have desktop application i want to get the copied files names from windows to my application ex: the user will copy any file from pc and i have button in my form i want when user click this button the name of files which he copied it appear in list box how can i do this ?? thanks in advance :)

    S D 2 Replies Last reply
    0
    • A ahmedhassan96

      hi every body i have desktop application i want to get the copied files names from windows to my application ex: the user will copy any file from pc and i have button in my form i want when user click this button the name of files which he copied it appear in list box how can i do this ?? thanks in advance :)

      S Offline
      S Offline
      SeMartens
      wrote on last edited by
      #2

      Hi, there is a class called System.IO.FileSystemWatcher. Using this class you can observe file actions on directory or file. If a file is copied the FileSystemWatcher will throw the event OnCreated. Problem is that you don't know if it is a newly created file or a copied file... but maybe it is a good point to start. Regards Sebastian

      It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

      A 1 Reply Last reply
      0
      • S SeMartens

        Hi, there is a class called System.IO.FileSystemWatcher. Using this class you can observe file actions on directory or file. If a file is copied the FileSystemWatcher will throw the event OnCreated. Problem is that you don't know if it is a newly created file or a copied file... but maybe it is a good point to start. Regards Sebastian

        It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

        A Offline
        A Offline
        ahmedhassan96
        wrote on last edited by
        #3

        thanks for reply baut file system watcher i must give it one directory to watch it i want get the name of the files on any where on computer thanks again for reply

        S 1 Reply Last reply
        0
        • A ahmedhassan96

          thanks for reply baut file system watcher i must give it one directory to watch it i want get the name of the files on any where on computer thanks again for reply

          S Offline
          S Offline
          SeMartens
          wrote on last edited by
          #4

          Okay, well, but isn't your drive a directory?

          It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

          D 1 Reply Last reply
          0
          • A ahmedhassan96

            hi every body i have desktop application i want to get the copied files names from windows to my application ex: the user will copy any file from pc and i have button in my form i want when user click this button the name of files which he copied it appear in list box how can i do this ?? thanks in advance :)

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            The FSW, as bad as it is, is the only solution you have. There is no event or any signal that says there is a copy operation going on.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007, 2008

            1 Reply Last reply
            0
            • S SeMartens

              Okay, well, but isn't your drive a directory?

              It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              Watching an entire drive is not a good idea. The FSW starts to perform badly the more you have it watch. He really doesn't have a solution to use since there is nothing that signals "Hey, there's a copy going on!".

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                   2006, 2007, 2008

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups