What are the files with a tilde ~ in their names? I recently see a lot of files and directories with names like "T9XY3G~X" on my android device. I find them in the directories I sync with my PC, even though they are not copied to my PC.

My device is a galaxy note with Android 4.3 and I use SyncMe for syncronization.

So, Is it safe to delete them? Can I prevent such files from appearing in future?
The files are generated by Samba when it encounters file name having invalid windows file name characters like :, \, &lt;, >, | or directories ending with dot. The reason the files appear on your Android device is they were synced back from your PC. You can safely delete the files, but they will mostly likely reappear again, as long as files with invalid characters are created by Android apps.