The .DS_Store file is a OSX system file, and contains desktop information for the according folder.
If you want/need to ignore this file, you might either test whether it is visible (convention says that when a file name begins with a period, the file is invisible), or you would use some other mechanism to create the list of files you want to copy. You might also look for file extensions and select accordingly.
If you can use Applescript, things get quite easy, because there you can create a list of files from a folder without invisibles.
I tried deleting the .DS_Store
but then reappears
as you can do to not let this happen
You can delete these files as many times as you want. The finder will always recreate them.
It may be possible to prevent them from appearing if you do not open the according folder in the Finder, and access its files only via the Shell.
If you could share you code how you are processing folder items we could help you out.