CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2012
    Posts
    2

    copy pdf file and place the file into different folders

    Hello,

    I am using Vb.net 2010 I want to copy pdf files (invoices) with numeric prefix (33.pdf, 226.pdf, etc.) from one folder and create new folder based on file name. For example file 33.pdf will go newly created folder call 33, file 226.pdf will go newly created folder call 226, etc. The number represents customer ID number. How do I achieve this? any insights will be appreciated. Thank you.

  2. #2
    Join Date
    Jul 2005
    Posts
    990

    Re: copy pdf file and place the file into different folders

    To create folder, search about:
    System.IO.Directory.CreateDirectory(yourpath)

    To copy a file, search about:
    System.IO.File.Copy( FileToCopy, NewCopy )
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts



HTML5 Development Center

Click Here to Expand Forum to Full Width