Hi guys

Im making a program in assembly that copies all of the text files from one folder to another , the problem that i have is how to join the path from the folder whit the name of the text files that the program reads.

Ex:

dest folder: num1 db "c:\teste1\*.*",0
file name: num2 db"hello.txt",0

That do in need to do to have c:\teste1\hello.txt


thanks in advance for any replay

Recommended Answers

All 3 Replies

You'll need a temporary string (ASCIIZ) at least 260 bytes long (260 is a Windows thing). First copy the directory name to the string. Then concatenate a "\", then concatenate the filename. Use the temporary to name the file in your copy/open function.

Hope this helps.

Ok i will try that

Don't forget to make yourself little subroutines to do stuff for you. In C there are the strcpy() and strcat() routines. Your routines should do the same kind of things.

That way you can use them as often as you like. If you are dealing with multiple files this will help tremendously.

Good luck.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.