| | |
first cannot conver std::string to const char, now runtime error!
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
Not sure whether it would work for TurboC and the old command.com shell, but you could try creating the command using double quotes to handle filenames with spaces. Don't know what will happen for long file names though.
e.g.
e.g.
copy "c:\yserver.txt" "c:\documents and settings\luffy-san\desktop\tcp1241_assignment3\lecture notes\server.txt"
バルサミコ酢やっぱいらへんで
Mmm
Maybe it's just enough if you surround the long filename with double quotes.
But bear in mind that command.com also has a limit (like 128 characters) on the length of any command line, so there could still be problems.
C++ Syntax (Toggle Plain Text)
$ dir Volume in drive C has no label. Volume Serial Number is F8A8-3449 Directory of C:\temp 25/09/2006 19:00 <DIR> . 25/09/2006 19:00 <DIR> .. 25/09/2006 18:58 2 my long filename.txt 1 File(s) 2 bytes 2 Dir(s) 13,895,516,160 bytes free $ $ copy "my long filename.txt" test.txt 1 file(s) copied. $ command.com Microsoft(R) Windows DOS (C)Copyright Microsoft Corp 1990-2001. $ copy "my long filename.txt" test2.txt 1 file(s) copied. $ exit
But bear in mind that command.com also has a limit (like 128 characters) on the length of any command line, so there could still be problems.
•
•
•
•
Not sure whether it would work for TurboC and the old command.com shell, but you could try creating the command using double quotes to handle filenames with spaces. Don't know what will happen for long file names though.
e.g.
copy "c:\yserver.txt" "c:\documents and settings\luffy-san\desktop\tcp1241_assignment3\lecture notes\server.txt"
Your friend,
~s.o.s~
Last edited by ~s.o.s~; Sep 25th, 2006 at 3:13 pm.
I don't accept change; I don't deserve to live.
![]() |
Similar Threads
Other Threads in the C++ Forum
- Previous Thread: Newbie in need of help!!!
- Next Thread: setprecision
| Thread Tools | Search this Thread |
api array beginner binary bitmap c++ c/c++ calculator char class classes code coding compile compiler console conversion convert count data database delete desktop developer directshow dll download dynamic email encryption error file forms fstream function functions game getline givemetehcodez google graph gui homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux loop looping loops map math matrix memory multiple news node number output parameter pointer problem program programming project proxy python read recursion recursive return sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






