I would like to make a tool to run the following command in Eclipse. However, I haven't had success because "copy" is not a "Location" of a program, and so Eclipse doesn't recognize it.
copy /b ${env_var:SERVER_HOME}\pickup\star-web-custom.plan +,,
Any suggestions? I'm fairly new to Eclipse.
In "Location" put ${env_var:SystemRoot}\system32\cmd.exe
In "Arguments" put /c "copy /b ${env_var:SERVER_HOME}\pickup\star-web-custom.plan +,,"
It should help. If something goes wrong, then just try to play with "Arguments" as of something simple like /c "somesimplecommandhere"
Put this command in a script and then set the location of that script (full path, including the full name of the script) in the "Location" text box.
I would usually write this sort of thing as an Ant task instead of an External Tool configuration. That's not to say that you can't do it. One advantage of the Ant task is that it is more portable.
Related
I am using Listary (which is a comfortable explorer integration) and I want to be able to start an instance of "Windows Terminal" in the current directory. My Listary command is configured, so that it starts the application under the path
C:\Users\%user%\AppData\Local\Microsoft\WindowsApps\wt.exe.
Unfortunately I couldn't find out yet a way to pass a target directory to Windows Terminal as a parameter. It refuses to take any paths and always starts at the %userprofile% directory. Is there a way to accomplish this behaviour?
I have found the solution, after reading this article:
https://devblogs.microsoft.com/commandline/windows-terminal-preview-v0-9-release/
In short, you have just to type "-d ." into the "Parameter" field of Listary's custom command. "." refers to the current directory.
I have a problem to run a ps1 file with powershell with using hotkey , normally we run ps1 file by using right click mouse and choose run with powershell , but that is too slow for me , so I like to use hotkey to make it , if any expert know the answer please help . Thanks
easiest way I have found to do this is to create a simple BAT file:
Open notepad and enter the below
start powershell c:\scripts\powershell-script.ps1
Changing the c:\scripts\powershell-script.ps1 bit for the location of your script.
Then file > save-as > other files. Name it as "start script.bat" or something. You can then just double click the BAT file and this will run your script.
There may be better ways, but this is the simplest and easiest way I found that is very painless.
Is it possible to create a macro in Notepad++ that is able to utilize the "Run" command so that I may call an external .exe to operate on the file specified? I am able to do it manually, but when I create a macro that includes the run (F5) and give it a specified command it fails to execute. Is this because the run command isn't supported when creating macros? If so, is there a work-around method?
Thanks
edit: to add context -- I've written a couple ruby scripts to facilitate data-entry that's done using notepad++, and would like to integrate them to the editor. Having them run by a shortcut method created by recording a macro seems to be the best way to do this, unless it's not possible to utilize the run command.
FWIW The Zeus and Zeus Lite editors can do this.
You can do it with the NppExec plugin (available in the Notepad++ wiki ). It allows you to create mini-scripts with keywords that perform commands.
You will also be able to add your script in the contextual (right-click) menu, or assign a shortcut to it.
I personaly uses it to saves a sql file, place myself in the current directory, and then executes isql.exe (external executable) on that file. That simple script transforms my Notepad++ into a rather handy SQL IDE.
I don't think you do it using only Notepad++.
Please see this thread:
http://sourceforge.net/projects/notepad-plus/forums/forum/331754/topic/4805532
If I understood you correctly, you have it all set up but are having issues with running it through Notepad++'s run command?
If so, try what I mentioned here.
I had similar issues with running php compiler and resolved it with the "cmd /c" added like in that mentioned example. And a "& pause" at the end, just so I see what goes on.
I need to send commands to the windows CMD or linux terminal from an Eclipse wizard. Not my first choice but I'm not the architect so just following orders. Is there a way to send a command to the CMD and/or Terminal?
For an example, we'll be doing:
mvn -create $projectName $location
where we replace the project name and location with values from the wizard. Yes I know there is an mvn plug-in, I have a specific reason for needing this (or at least my boss does). Suggestions?
Also, I do NOT need a plug-in that allows you to type to the CMD or Terminal from Eclipse. Thanks
If you do this in a separate thread - e.g. a new Job - then you can just use the existing java.lang.Runtime.exec(...) mechanism...
If you want to follow the execution as well in a console within IDE, then have a look at org.eclipse.debug.internal.ui.views.console.ProcessConsole or one of its super-classes.
I'm having a very weird issue with the command line and running Ant. I point the path variable at the location of my Ant bin directory (C:\Ant\bin) and when i go into a command window and type PATH it shows the location in it. But when I go to run Ant by typing "ant" it does nothing and states that it isn't recognized. But when I go to the run window (Windows+R) and type "ant" it runs it.
I have restarted Windows twice and the problem still persists. I am running Windows Vista Ultimate with SP1 installed. I have tried "Running as Administrator" with no difference.
Any one experience anything like this before?
Sometimes you can set a system-wide (or even just personal) Environment Variable and it'll cure it, as opposed to just setting it in your shell.
Go to the Control-panel, then System, then Advanced, and look for the button on Environment Variables. From there, you can follow your nose.
Good luck.
Ant also depends on Java to be on the path. Do you have that?
I would also check to make sure the environment variables ANT_HOME and JAVA_HOME are set up properly in the console.
Is there any chance that the command window you are trying to run Ant in is a different window to the cmd windwo where you set up and verify that its in the path? If the PATH is updated after a cmd window is already open it won't recongnise the change. Not clear if that might be your issue.
If you are in the dir C:\Ant\bin and type "ant" does it recognise it?