Good night.
Today I have started to study ms-dos CMD. I have started with the assoc command.
For greater understanding I tried to do this thing.
I installed notepad++ and I asociate the extension .ntop=notepadfile.
Then with the command ftype I asociated the binary file that the system have to use for open this archive.
ftype notepadfile="C:\Program Files\Notepad++\notepad.exe" "%1" "%"
I recognize I dont undertand what is %1 and % but there is no errors in the console
------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------
In the picture we can see the system dont recognize the extension .ntop like notepadfile
I thought it was going to be automatic and with google there are many results that have nothing to do with what I am looking for.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
I thought that the system would choose the program with which to open the file automatically. I know If I click in the change button I can select the specific program
but want to do this with commands line.
Thanks for your attention and sorry if my english is a little bad.
type file dont change??
Moderator: DosItHelp
-
- Posts: 3
- Joined: 25 Jan 2022 14:05
type file dont change??
Last edited by nigromante on 26 Jan 2022 13:36, edited 1 time in total.
Re: type file dont change??
Were you doing this from the command line or a batch file?
-
- Posts: 3
- Joined: 25 Jan 2022 14:05
Re: type file dont change??
by command line with cmd (run as administrator)...
I thought if I create a file with the extension .ntop the system set notepad++ automatically.
Code: Select all
assoc .ntop=notepadfile
ftype notepadfile="C:\Program Files\Notepad++\notepad.exe" "%1" "%"
Last edited by nigromante on 26 Jan 2022 13:35, edited 1 time in total.
Re: type file dont change??
Be sure you are selecting the correct location of the notepad++.exe file. On my system at least, the path is: "C:\Program Files (x86)\Notepad++\notepad++.exe"
-
- Posts: 3
- Joined: 25 Jan 2022 14:05
Re: type file dont change??
Yes...It is the correct path/rute of notepad.
I make a video of 1 minute for if someone want to see it. maybe seeing what I did you can see the error I maked.
https://www.youtube.com/watch?v=POZ7tU-_m_s
Thanks......
I make a video of 1 minute for if someone want to see it. maybe seeing what I did you can see the error I maked.
https://www.youtube.com/watch?v=POZ7tU-_m_s
Thanks......
Re: type file dont change??
Well, I see you edited your post to correct the file path, but now you don't have the correct file name. It should be notepad++.exe and not notepad.exe, which is a Windows system file in the C:\Windows\System32 folder.nigromante wrote: ↑26 Jan 2022 14:06Yes...It is the correct path/rute of notepad.
I make a video of 1 minute for if someone want to see it. maybe seeing what I did you can see the error I maked.
https://www.youtube.com/watch?v=POZ7tU-_m_s
Thanks......