Hey, does anyone know which function/s i need to use to copy a file from one subdirectory to another, without changing the name? im on windows if that helps.
lexusdominus
1
Junior Poster in Training
Recommended Answers
Jump to PostYou can use system() command to do that.
system("//copy file.txt folder");
Jump to PostI meant system("copy file.txt folder");
// i gave that as a comment.
For example...system("copy myfile.txt c:\my\location");
Jump to Post1) If you want the program to work from anywhere on the system. And the file is surely found at the same path. you should prefer writing down the whole path.
2) If the file is in a subdirectory of your program directory. Consider
progdir->subdir->abc.txt
And you want to …
All 12 Replies
Arbus
25
Practically a Master Poster
lexusdominus
1
Junior Poster in Training
Arbus
25
Practically a Master Poster
lexusdominus
1
Junior Poster in Training
Sky Diploma
571
Practically a Posting Shark
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
lexusdominus
1
Junior Poster in Training
Sky Diploma
571
Practically a Posting Shark
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
lexusdominus
1
Junior Poster in Training
lexusdominus
1
Junior Poster in Training
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.