Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 12-10-2006, 01:44 PM   #1
LQ Newbie
Registered: Dec 2006
Posts: 5

Rep: Reputation: 0
Question Copying Files from one source to a destination

Hey everyone I was wondering if anyone would know an effective method to copy a folder from a source directory to a destination directoy using C++. I was thinking that using command line commands would be the most effective method but this may be flawed. I'm not looking for an answer with code I'm just looking for ideas. Thanks in advance.
Old 12-10-2006, 02:28 PM   #2
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,567

Rep: Reputation: 164Reputation: 164
Shell command is one solution. The other one is to write it in C/C++. You have opendir/readdir/closedir to deal with directories, so you can get access to every file, then open orginal one and the copy and rewrite the whole content.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying source files from CD to HD aznluvsmc Linux - Newbie 3 08-25-2004 02:17 AM
How do I have tar skip files already on destination HD? Bob Ross Red Hat 2 02-04-2004 12:43 PM
How to delete the destination files while the source files deleted in cp -u ? myunicom Linux - General 4 09-26-2003 01:13 PM
iptables - source ? destination ? From where ? Dek Linux - Networking 3 04-30-2003 11:43 PM
Martion Source/Destination bfloeagle Linux - Networking 2 06-13-2001 06:42 AM

All times are GMT -5. The time now is 04:51 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration