You're very, very close - close enough that I wonder if this is permissions issues rather than program ones... Or, perhaps, parts of the program we didn't see, preventing it from working.
By the way, if this is the sort of C++ program that's line after line of system(), it'd probably be more easily "ported" to shell script.
You were correct btw, the way it was originally written was trying to access linux root directory.
Interesting, strangely it works both ways.
No errors everything compiles fine, just can't get it to move up
the directory tree 2 levels.
seems the best I can do is cp file ../ and move up one directory. I may have to rearrange my directory structure to get this to work in linux. Thanks for all your suggestions
You certainly won't need to modify the directory structure as any *nix system is very versatile in and capable of moving files around.
Maybe your approach would benefit from slight adaptions, e.g. as proposed by Corona668?
If cp file ../ (or cp file .. ) works to move the file up one level, then cp file ../.. will work to move it up two levels (with obvious exceptions for being too high in the filesystem hierarchy and symlinks).