flat assembler
Message board for the users of flat assembler.

Index > DOS > Copying files

Author
Thread Post new topic Reply to topic
Walkerboh



Joined: 08 Jul 2010
Posts: 17
Walkerboh 25 Dec 2010, 02:15
Hey there! I need to write a program to copy all the files in a network shared folder to a local folder. The purpose is to have a backup of photos created from a webcam hooked to a laptop(in case its stolen or destroyed). Is this possible with DOS interrupts? Is there a copy procedure in winFasm?(I've been learning from 16 bit asm so far)

I'm considering using dos interrupts to:
copyFile:
open file(in network shared folder)
loop until eof
write word to buffer
;
create new file(in local folder)
write buffer to file

Is there a better way to go about this or am I on the right track? thx much
Post 25 Dec 2010, 02:15
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1900
DOS386 25 Dec 2010, 05:47
> copy all the files in a network shared folder

Your OS and network program ?

> possible with DOS interrupts? Is there a copy procedure in winFasm?

Are you in the right subforum ?

> Is there a better way to go about this or am I on the right track?

If you are using Windows, use WinAPI
(other subforum).

If in DOS, open both files, and loop with copying
(max $FFFF, better $F000 Byte's per pass).

If copying to same physical disk, you might
want to prefer a bigger buffer (maybe 360 KiB
of low memory or some XMS), still, you will
need multiple reads and writes to fill it.
Post 25 Dec 2010, 05:47
View user's profile Send private message Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 789
Location: Adelaide
sinsi 25 Dec 2010, 06:50
Use a batch file.
Post 25 Dec 2010, 06:50
View user's profile Send private message Reply with quote
Walkerboh



Joined: 08 Jul 2010
Posts: 17
Walkerboh 27 Dec 2010, 03:31
Thx, I'm gonna take a look at the WinAPI. Short term XCOPY in a .bat is working for me.
Post 27 Dec 2010, 03:31
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.