CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2004
    Posts
    47

    Exe to copy files

    I want to make an application (exe file) in visual studio. I want to use this application to copy files from one location to another. This application should accept two command line arguments, one destination path and the other source path. I think I should start from scratch to accomplish this. Can you throw a few pointers as to how to get started with this?

    Many thanks

  2. #2
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: Exe to copy files

    CopyFile and your done.

  3. #3
    Join Date
    Dec 2004
    Posts
    47

    Re: Exe to copy files

    Actually i want to copy a folder from one location to another. But more than the logic to copy, i want to know how to set up the exe to accept the command line arguments.

    I want to call the application from somewhere else like this:

    <Application Name> <Source location> <destination location>.

    thanks

  4. #4
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: Exe to copy files

    Actually i want to copy a folder from one location to another
    Enumerate your folder with CFileFind and copy each file.

    i want to know how to set up the exe to accept the command line arguments.
    Search Codeguru, there are alot of samples.

  5. #5
    Join Date
    May 2005
    Posts
    4,954

    Re: Exe to copy files

    Or you can use ::SHFileOperation() which will copy the whole folder in one goal.

    Cheers
    If a post helped you dont forget to "Rate This Post"

    My Article: Capturing Windows Regardless of Their Z-Order

    Cheers

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured