PDA

Click to See Complete Forum and Search --> : Create Shortcut


prog_tom
Jan 16th, 2002, 04:37 PM
Does anyone know how to copy a file to another place? As well as how to create a shortcut in a specific path?
Thanks

Wynd
Jan 16th, 2002, 05:34 PM
You can use the system() function which is like typing at a DOS prompt.
#include <cstdlib>
using namespace std;

// ...

sprintf(szCmd, "copy %s %s", szSrc, szDest);
system(szCmd);

prog_tom
Jan 16th, 2002, 05:42 PM
Can you give me an example?

Also do you know how to create a shortcut?

CornedBee
Jan 17th, 2002, 08:58 AM
For API there's the CopyFile function. I coudn't find a function to create a link to a file.