File and folder transfer

This is a discussion on File and folder transfer within the C++ Programming forums, part of the General Programming Boards category; I want to transfer all my files and folders from one drive to another. Can anyone suggest how I could ...

  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    12

    File and folder transfer

    I want to transfer all my files and folders from one drive to another. Can anyone suggest how I could code this?

    Many thanks

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    In windows explorer, select the root folder(s), click and drag to the other drive. Wait! Done!
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    Registered User
    Join Date
    Sep 2002
    Posts
    12
    Sorry perhaps I didn't make myself clear. I meant how can I do this using C++ code.

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,892
    In plan C++, not. You need some extensions, such as the WinAPI or Boost.Filesystem.

    Then you just walk through the directories and files recursively, creating the equivalent structure at the target and calling move (That's boost::move or MoveFile or ...) for each file.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  2. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 03:30 PM
  3. function to copy file from one folder to another
    By Harman in forum C Programming
    Replies: 7
    Last Post: 05-15-2005, 11:39 AM
  4. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM
  5. Invoking MSWord
    By Donn in forum C Programming
    Replies: 21
    Last Post: 09-08-2001, 04:08 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21