Greetings fellow software devs, I am a student who is interested in learning git. I was learning it, i was using the vs code terminal and I tried running the following command to show all the hidden files in the current directory: dir /a:h dir /a:hd D:\Git
But I got an error saying: A positional parameter cannot be found that accepts argument '/a:hd'
It is requested to tell me how to solve this
Related
Here I use windows10 cmd. I tried to compile .py to .exe with Nuitka lib and set my own icon to the future app. It worked perfectly without setting icon, but when I try to use:
python -m nuitka --mingw64 --windows-icon-from-ico=my/path/to/the/icon.ico my/path/to/executable/file.py
for compilation, I always catch an error, that says:
"FATAL:
Error, specify only one positional argument unless "--run" is specified to
pass them to the compiled program execution."
As Maxim Paperno noticed, such an error may occur when you have a path to an icon with a space(s) in it. When you have a space in a path and you use such a path in a terminal, then the part after the space is recognized by command string as another positional argument.
P.S. That's a really bad practice to use spaces in folder/file names, it can lead to unexpected errors anytime you work with such paths.
I've been having difficulty setting up lua as a system path. I'm attempting to run lua programs via the command prompt. I've followed multiple stackoverflow answers for similar questions:
Running a lua program from a text file
to no avail. Regarding the link's four steps: I'm able to complete step one no problem, would like to complete step three and step two onward have thoroughly confused me.
I've edited my PATH variable to include what I believe the correct path for lua is: C:\Program Files\Lua\5.3.4_64\lua53.exe. I feel like this is where I'm botching it.
This is the general output when I try to run lua from a cmd prompt within the folder holding lua.exe or outside of it.
C:\Program Files\Lua\5.3.4_32>lua main.lua
'lua' is not recognized as an internal or external command,
operable program or batch file.
If anyone can help or needs more information to help please let me know and thank you in advance.
You need to add the folder of lua53.exe to the PATH variable. That is, add C:\Program Files\Lua\5.3.4_64, not C:\Program Files\Lua\5.3.4_64\lua53.exe. Then when you type lua53 in the command prompt, the command processor will search in that folder for lua53.exe and run it.
If you want to run Lua in the command line with the name lua, you will have to rename lua53.exe to lua.exe, or create a batch file named lua.bat with the content lua53 %* and save it in the same folder as lua53.exe. (%* is a variable that copies the arguments that you typed after the name of the batch file. That is, if you type lua -e "print 'Hello, world!'" in the command line, it will execute the command lua53 -e "print 'Hello, world!'".)
I'm messing around with some very complex build definitions in VS/TFS 2013 and the build is failing with the following error message:
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets (1131): The command "cd C:\Builds\34\GEARView\Copy of GV-All\Sources\GEARView\RecordViewer\
attrib -r "C:\Builds\34\GEARView\Copy of GV-All\Sources\GEARView\RecordViewer*" /S /D
C:\Builds\34\GEARView\Copy of GV-All\Sources\GEARView\RecordViewer\Build.bat" exited with code 9009.
So what I don't get is what is failing? There's a "cd" at the beginning of the message, so is that failing or is it the "attrib" in the middle of the message or is it actually calling Build.bat and that's failing?
And while I'm here I might as well ask another question, which is what on earth could be calling Build.bat? I searched all files in source control and couldn't find the string "build.bat".
I took the spaces out of the name of the build definition and the problem went away ;-).
For a little bit of context, I am in the process of developing a serious game (~participatory simulation) with Netlogo using Hubnet. I'd like to dynamically link NetLogo with an external model so that players are able to:
1) run an external program (i.e. a model) from their hubnet client interface, specifying parameters as inputs, and
2) have access to simulation results (i.e. reading model outputs as external files).
I found that post:
https://groups.yahoo.com/neo/groups/netlogo-users/conversations/topics/8145
so I downloaded/installed the shell extensions with NetLogo 5.0.5 (Mac OsX 10.7.5) and started to play with it.
The good things, I am able to execute :
observer>shell:cd "path"
observer>shell:pwd
observer>shell:exec "ls" (and all commands that do not need input parameters such as shell:exec "cal", shell:exec "df"...).
Now the bad things...
1) I am consistently failing to launch any random application using these commands:
observer>shell:exec "Safari.app"
or
observer>shell:exec "Safari" (-->error)
My working directory is correct and Safari (or other apps I am trying to launch) is actually present but NetLogo returns the following error:
Extension exception: Cannot run program "Safari" (in directory "/Applications"): error=2, No such file or directory
error while observer running SHELL:EXEC
called by Command Center
2) I am also struggling to execute shell commands taking parameters (for instance, shell:exec "open" "parameter 1" "parameter 2" ...). I am unable to find the correct syntax so that NetLogo don't recognize the input parameters I'm trying to pass to the command.
I have a very limited experience in Unix and I am a relative beginner with NetLogo so I must be missing something somewhere.
If anybody could help me through this, that would be greatly appreciated!
Thanks a lot!
Clément
Is OS X, you have to use open to open .app files. As you noted, you have to separate arguments to the program. So
(shell:exec "open" "/Applications/Safari.app")
should do what you want.
Here's an example of an actual executable with multiple arguments:
(shell:exec "ls" "-l" "-t")
Finally, note that shell:exec is a reporter. It returns the output of the program as a string.
I have a Windows batch script that I use to build a module and the script in turn uses the ClearCase clearmake command to drive the actual compilations, directory creations and file manipulations, i.e. process the Makefile content. The batch script works flawlessly when invoked using a DOS window or from a "cmd /c ..." command line invocation. And it has been that way for some number of years.
I recently decided to move the script to Ant. The first step, out of simplicity, was to simply invoke the script unchanged using an Exec task (using cmd /c). Almost immediately, Ant fails while creating a directory. The error message reports something like:
mkdir: Cannot create the directory C:\\fred\\harry\\joe
I was able to verify that, using the DOS command prompt, the mkdir C:\\fred\\harry\\joe command works fine, so, as near as I can tell so far, Ant generating double backslash path separators combined with something inherent to clearmake and/or something in the Makefile is causing the failure.
The response I'm looking for is something along the lines: "Yes, clearmake is definitely the culprit because..." or "If you twiddle this thing or that thing in Ant, only a single backslash will be generated...". Should there be no simple and quick explanation, I will drill into the problem to determine what exactly is causing the failure.
Thanks,
I have seen similar error with:
dynamic views (more sensible to ownership than a snapshot view on C:\, which is your case)
resource handle conflict (the script tries to update a resource already taken by another process, which shouldn't be the case here with your script, since it was working outside of Ant Exec task)
error message (like you create a directory which already exists: the error get ignored in a classic script, while it could interrupt the ant task.
While the last cause is a good candidate, try first to simplify your script (leave only the mkdir for instance) in order to check that this line is indeed the issue (nd not "this line in conjunction with others actions taking place just before")