Teen Programmers Unite  
 

 

Return to forum top

need a code

Posted by lekkie [send private reply] at August 13, 2002, 02:45:44 PM

I need C++ code to del and replicate files.

Posted by RedX [send private reply] at August 13, 2002, 04:15:28 PM

Not that long ago there was a thread about copying file in C++. Deleting is easy: int remove(const char *filename)

Posted by whizkide [send private reply] at August 16, 2002, 08:44:47 AM

yo dum guy.
to delete u could do somethin' like this.
unlink("filename.ext");

to copy in dos just use the system command
system("copy *.* *.*"); lol
u could also delete with the system command
system("del *.*);

if u dont use DOS then ull have to write ur own byte copy program. hahahahaha
thanx tpu!!!!

Posted by CViper [send private reply] at August 16, 2002, 02:37:43 PM

ohh, the guy from last time.

anyway if your doing Win32, look into CopyFile() or CopyFileEx(). while you're browsing the MSDN (msdn.microsoft.com/library - atleast the last time i checked), you might aswell stumble across a Win32 call to remove a file for you.

Posted by AnyoneEB [send private reply] at August 17, 2002, 09:11:46 AM

Yeah, DeleteRandomFile(), should be right next to LockUp(). ;)

Posted by CViper [send private reply] at August 18, 2002, 05:43:20 AM

hehe :)

Posted by RedX [send private reply] at August 18, 2002, 06:37:20 AM

I don't think you'll find much info on DeleteRandomFile() or LockUp(), they are key features of the kernel. Just like M$s highly optimised do-nothing loop and the software adaption system (makes sure windows runs on ever PC at the same speed as it would on their test machine back in 1972)

You must be logged in to post messages and see which you have already read.

Log on
Username:
Password:
Save for later automatic logon

Register as a new user
 
Copyright TPU 2002. See the Credits and About TPU for more information.