Moving file by filtering with some extension

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dhaya
    New Member
    • Oct 2011
    • 2

    Moving file by filtering with some extension

    I want to move the files from a folder to another by dynamically checking with some specific file extension.for example.if my folder A contain 2 .txt and 1 .zip.i want to move only the .txt file alone to folder B.can any1 help in this issue
  • GaryTexmo
    Recognized Expert Top Contributor
    • Jul 2009
    • 1501

    #2
    Have a look at the Directory class. The GetFiles method takes a search pattern as one of the arguments. You can use this to get only the file names in the directory you want and then move those.

    Comment

    • dhaya
      New Member
      • Oct 2011
      • 2

      #3
      Am really sorry for the late reply.Thanks a lot for your answer.

      Comment

      Working...