• Want to help us with this year's BoS Trials?
    Let us know before 30 June. See this thread for details
  • Looking for HSC notes and resources?
    Check out our Notes & Resources page

Having a little trouble (1 Viewer)

Disco_Stu

New Member
Joined
Mar 29, 2004
Messages
2
Location
Wagga Wagga, central N.S.W.
Hello all,
Im trying to make a back up program. im having trouble trying to move the files to a set location. any help in acheiving this would be great.

PS please dont go off at me if this has been asked before, just redirect me.
 

Winston

Active Member
Joined
Aug 30, 2002
Messages
6,128
Gender
Undisclosed
HSC
2003
would be great if you told us what language you're doing it in.
 

Mithoric

Member
Joined
Mar 14, 2004
Messages
98
Gender
Undisclosed
HSC
2004
Well this goes for anything using the Win32 API --

You have 2 methods,

1. Reading the file and writing it to the location.
2. Using the MoveFile() API function which I'm pretty sure does 1 anyway.

MoveFile( LPSTR src, LPSTR dest );

I'm used to C++ so LPSTR means string for you vb simpletons. :p
 

sunny

meh.
Joined
Jul 7, 2002
Messages
5,350
Gender
Male
HSC
2002
VB: FileCopy function, no APIs needed.
Java: java.io, FileInputStream and FileOutputStream.
 

sunny

meh.
Joined
Jul 7, 2002
Messages
5,350
Gender
Male
HSC
2002
API is short for Application Programming Interface (there other abbreviations as well).

Its a way of letting you use pre written routines in the operating systems for some tasks that is either very common, or not possible natively in the language.

For VB, just use the FileCopy function built into VB.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top