When CMD commands, sometimes the parameter is a long path, the input is very troublesome, how to solve?

Source: Internet
Author: User
Recently in the PYQT, in the conversion UI file as a py file, everyone said with the cmd input command, but some files in a very deep directory, input is too troublesome, how do you solve it?
Is there software for this aspect of graphical interface? Drag the file directly to get the parameters?

Reply content:

Directly find the file dragged into the cmd, the path is out, always do windows7, in the directory where the UI file is empty, hold down SHIFT and then right-click to open cmd in the current directory.
You can also install some CMD reinforcing tools, such as Powercmd. You can integrate the right-click menu. See no one mentioned yet. ZSH also has a function is, hit **/sb.py, you can automatically put sb.py full path to fill out.

For a chestnut, I am now under a directory, remember that there is a shell script is backup what what. sh, but the specific name does not remember, but also long, I am too lazy to find out where in the end.
Because under the zsh, just hit
vim **/backup*sh
is there software for this aspect of graphical interface? Drag the file directly to get the parameters?
You're learning pyqt, how hard it is to write one. I gave my cmd a clink: https:// github.com/mridgers/cli NK , so you can press TAB to complete the auto-completion. Want to use the Linux command, but do not want to install Cygwin/msys/gnuwin32? That Gow good: https:// Github.com/bmatzelle/go W

In addition, I also like Conemu:conemu-handy Windows Terminal
Is it common for----to write code with git? Git for Windows
Remember to check the options on the right-click menu when installing. Install the buckle into the directory, right click on the blank, select "git bash"
out of the command-line window has been positioned to the specified directory, you can directly run the cmd or PowerShell command: Out of the command-line window has been positioned to the specified directory, you can directly run the cmd or PowerShell command:

However, the main use of the scene, the best way to write the cmd command as a bat file, and then drag the UI file to the bat file icon. I used to compile and run Java all this way.

command to get the file name:
@echo offecho 无后缀名: %~n1echo 有后缀名: %~nx1echo 绝对路径: %1echo 短路径名的绝对路径: %~s1echo 驱动器和路径: %~dp1echo 驱动器: %~d1echo 路径: %~p1echo 文件属性: %~a1echo 日期/时间: %~t1echo 文件大小: %~z1pause
Copy the file path and right-click on the command line. Enter. How to do the file navigation efficiently Fuzzy Search, get file full path

Add in ~/.BASHRC:
Export histsize=32768

And then press C-r to search for the used command.

CLVV/FASD GitHub The files you've accessed, the directories you've been through will be remembered.


Faster than the mouse, because the mouse to expand the folder also time.

There may be a quicker and more convenient solution in the world (I haven't seen it at the moment), the thinking must be the same, double-tap the keyboard fuzzy search, let the computer remember history.

You need a bash shell, a python-developed tool Percol, and since you're using Python, that's not a problem. You say cmd By default you're working under Windows
Make a script. bat. py can do anything.
Add a convert to Py file type to the UI in the registry to open the way
With the script you wrote in the inside.
I WHL all this. Ahk Fast food restaurant [26] Ctrl+p paste directly in cmd

PS, is a script written with Ahk, alt+3 copy the currently selected Ahk file full path, shortcut key to open cmd,ctrl+p.
It's gone.

"' AutoHotkey

;; Alt+3 Copy the full path name of this file
! 3::
GetFilePath ()
Return



Copyselection ()
{
Clipboard =
Send ^c
Clipwait, 1
If ErrorLevel
{
MsgBox, the attempt to copy text onto the clipboard failed.
Return
}
return clipboard
}



GetFilePath ()
{
Path: = Copyselection ()
If Path =
Return
Mousegetpos,x0
Clipboard =%path%
ToolTip Path: "%clipboard%" copied

Canceltooltip ()
Return
}

Canceltooltip ()
{
Loop
{
mousegetpos,x1; mouse Nudge cancel Prompt box
If x1!=%x0%
{
ToolTip
Break
}
}
}

;; Win cmd Ctrl + P paste directly
#IfWinActive Ahk_class Consolewindowclass
^v::
Send%clipboard%
Return

```
If you are interested in Ahk, you can take a look at the big
The beauty of AutoHotkey:
/ http Zhuanlan.zhihu.com/auto Hotkey


Dragging what is also a very simple operation (but, the notebook screen small, the drag is annoying AH (+﹏+) ~ Crazy Halo).
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.