ZTree.com  | ZEN  | About...  

 Index   Back

C command line processing   [Zeta]

By: Ryan       
Date: May 15,2020 at 05:50
In Response to: C command line processing (Ben Kent)

> https://docs.microsoft.com/en-us/cpp/cpp...nction-command-line-args?view=vs-2019
> \" is an escaped "
it sucks but i am glad to know now.

> ...I guess you are using defensive programming techniques to handle...


C:\ZTREE\ZTW.EXE /M /Y A B "M:\X Y" "AA BB.TXT*" /K,ENTER,f,ENTER
----1---- --2----- -----3------ ------4---------

it is a novice way that i hope to write a command line to handle to all things.
i will try to seperate 2 cases; drive and the rest of dir and file.
because if i dont put in something like "*" then the 4th argument goes to the 3rd argument position then it ruins things. the same thing goes to the quotation marks.
if i dont use them, it cant read names with spaces. if i use quotations then they cant handle root drives and also cause an acceptible minor problem in directory names.



you asked me about something about powershell a while ago
my ans is.. i cant use or never use powershell..... not in my life (i dont have much left). i may learn one or two things about it over the shoulders but not more. it is for the next generation.
it is nearly a miracle for me to get to know DOS batch commands this far since XT computers, i am a physicist, i only solve numerical math problems. it is kind of fun to talk about DOS commands sometimes, because they have so many operators in my eyes.

320 views      
Thread locked
 

Messages in this Thread

 
95,257 Postings in 12,014 Threads, 350 registered users, 136 users online (0 registered, 136 guests)
Index | Admin contact |   Forum Time: Jan 20, 2021 - 10:43 am UTC  |  Hits:36,922,451  (11,278 Today )
RSS Feed