LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 12-10-2006, 01:44 PM   #1
vgdeveloper05
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
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,535

Rep: Reputation: 148Reputation: 148
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.
 
  


Reply


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 03:54 AM.

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