WHere are you trying to change the location to? Might be as simple as adding " " around the file path.

example:

write -c "c:\path to\file.txt"