0

Hope everyone is doing well.

I'm using Vugen/LoadRunner and need to copy a file from my local to a network share.

I would like to get away from cmd line to copy a file.

Mainly this:

printf(command, "%s", dirName);

system(command);

Spinning up 50 instances of cmd is cumbersome.

I'm wanting to do in pure c code in Vugen.

Would this information be sufficient explanation for anyone to provide some feedback when they have time?

Cheers, DJay :)

djs
  • 3
  • 4
  • The process goes something like this: open file A for reading, open file B for writing (with create flag set), read from A & write to B till end of file is reached, close A & B; rinse and repeat. – technosaurus Nov 21 '14 at 04:06
  • Thanks, for spelling out the logic. How is file B opened if it does not exist? – djs Nov 21 '14 at 17:55
  • O_CREAT for `open()`, or w+ for `fopen()` – technosaurus Nov 21 '14 at 22:42

1 Answers1

0

Query Google for "C" and "File Copy"

http://msdn.microsoft.com/en-us/library/windows/desktop/aa363851%28v=vs.85%29.aspx

James Pulley
  • 5,606
  • 1
  • 14
  • 14
  • Thanks, for the reply. I've seen this link before and it is for c++, so I wasn't able to use this information. – djs Nov 21 '14 at 17:57