File copy
I'm creating an application for sorting text documents based on their contents.
The ap works like this: I have a folder where the files I want sorted are, I supply parameters for my filter, and then a path where I want the appropriate file copied to (say I want to sort for the letter 'a', my ap seeks the right file, and then copies it to the given result dir)
But I've come accros problems, The position of the files to sort is hard-coded, but the result location isn't, it's a string that the user supplies.
Say that I want to list the results here:
"C:\TESTMAP\Testing map folder\sometxt.txt"
The problem is, every time I give my program a string:
C:\TESTMAP\Testing map folder\sometxt.txt
The program doesn't copy anything, after some error checking I see that windows shoves an error 123 (ERROR_INVALID_NAME, aka: The filename, directory name, or volume label syntax is incorrect)
What's going wrong?