Access file through command line
Moderators: Hacker, petermad, Stefan2, white
Access file through command line
I have this problem:
I copy the path of the file and paste it in command line. It tells me : File not found!
Why this happen!
How can i open the file by command line?
I copy the path of the file and paste it in command line. It tells me : File not found!
Why this happen!
How can i open the file by command line?
Exactly
Thank you!
I will explain this in details.
In my office there is server, we have office chat and when a document come by e-mail, someone put the path of the document in the chat, so you can open it by copying the path and paste it in command line.
The others use FreeCommander and there is no problem with that. I like Total Commander much and when I put the path in my total commander command line, I get the message "File not found!" . Even if it is a file in my computer (for example in disk D), i have the same message. I cannot open the file from a command line at all. This bothers me.
I realize that if a filename have spacers in the name, total commander can't find it. If the name is without any spacers, it opened it. And if the filename have spacers and I put the whole path in "", it open it too? Why does it matter this spacers?
I will explain this in details.
In my office there is server, we have office chat and when a document come by e-mail, someone put the path of the document in the chat, so you can open it by copying the path and paste it in command line.
The others use FreeCommander and there is no problem with that. I like Total Commander much and when I put the path in my total commander command line, I get the message "File not found!" . Even if it is a file in my computer (for example in disk D), i have the same message. I cannot open the file from a command line at all. This bothers me.
I realize that if a filename have spacers in the name, total commander can't find it. If the name is without any spacers, it opened it. And if the filename have spacers and I put the whole path in "", it open it too? Why does it matter this spacers?
Because Free Commander does that to convince (tenderfoot) user.
But it is not always good to be that smart and lie to your users. That way they will never learn.
With TC you can do such many different things that you exactly have to tell what you really want to do.
So if your path contains space, you have to quote them.
Even a leading quote is enough, BTW. Then TC knows what you want to do.
But it is not always good to be that smart and lie to your users. That way they will never learn.
With TC you can do such many different things that you exactly have to tell what you really want to do.
So if your path contains space, you have to quote them.
Even a leading quote is enough, BTW. Then TC knows what you want to do.
Quite cocky, aren't we?Stefan2 wrote:Because Free Commander does that to convince (tenderfoot) user.
But it is not always good to be that smart and lie to your users. That way they will never learn.
Not only implying that Free Commander users are unexperienced and need to learn,
but also assuming that this automatic behavior is worse than TC's semi-automatic.
The need to quote paths is a Windows requirement, due to ages old API and command line rules.
Assuming that it's better to suppress automatic quoting is shortsighted when it comes to productivity reasons.
I don't mind TC's current behavior, but not every user has the same expectations.
And BTW, tenderfoot = inexperienced.
Please spare the rare synonyms.
TC plugins: PCREsearch and RegXtract
It is worse because it fails if you want to add more than one file name into the command line.milo1012 wrote: ...
Not only implying that Free Commander users are unexperienced and need to learn,
but also assuming that this automatic behavior is worse than TC's semi-automatic.
How can Free Commander know what the spaces between words mean ?
Seriously?Horst.Epp wrote:How can Free Commander know what the spaces between words mean ?
Simply by checking if the first command parts reference an existing file/path.
If's the same if you'd have a file
Code: Select all
c:\dir1\the first file.exe
When having more files with same name parts you'd check which one matches the command line the most and quote it.
I'm not sure if it's some API call or an autonomous algorithm, but it works.
Of course, if you would reference other files/paths with spaces later
in the command line you'd still have to quote them manually,
but for most simple or average use cases this will work.
I really wouldn't call that worse, since all following parameters stay untouched, but it already helps in cases like TauMaster's.
TC plugins: PCREsearch and RegXtract