strings problem

Please support our Assembly advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Dec 2007
Posts: 2
Reputation: chubajj is an unknown quantity at this point 
Solved Threads: 0
chubajj chubajj is offline Offline
Newbie Poster

strings problem

 
0
  #1
Dec 16th, 2007
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
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 1,953
Reputation: Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of 
Solved Threads: 214
Featured Poster
Duoas's Avatar
Duoas Duoas is offline Offline
Posting Virtuoso

Re: strings problem

 
0
  #2
Dec 16th, 2007
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.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 2
Reputation: chubajj is an unknown quantity at this point 
Solved Threads: 0
chubajj chubajj is offline Offline
Newbie Poster

Re: strings problem

 
0
  #3
Dec 17th, 2007
Ok i will try that
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 1,953
Reputation: Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of 
Solved Threads: 214
Featured Poster
Duoas's Avatar
Duoas Duoas is offline Offline
Posting Virtuoso

Re: strings problem

 
0
  #4
Dec 17th, 2007
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for Assembly
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC