The general idea is pretty simple, I want to make a script for a certain task, I do it in the shell (any shell), and then I want to copy the commands I have used.
If I copy all the stuff in the window, then I have a lot of stuff to delete and to correct. (and is not easy to copy from shell)
Resume: I want to take all the things I wrote...
Hi,
I need a way to store the current user's SID in a variable, I tried a lot of variants of:
setlocal enableextensions
for /f "tokens=*" %%a in (
'"wmic path win32_useraccount where name='%UserName%' get sid"'
) do (
if not "%%a"==""
set myvar=%%a
echo/%%myvar%%=%myvar%
pause
endlocal
None are working
wmic path win32_useracco...
hi guys i have a bat script in which gets all files in a folder and then converts this folder with its contents into a one RAR file. This script also adds the current date once it makes a copy and moves it this file into a backup folder, i am planning to have this bat file run by a windows scheduler task every day. My question is there...
We have some code that works and it's a Win32 app with a GUI, but I would like to be able to trigger it from the command line as well (silent mode). Is there any easy way to do this? Or do I have to create another project as a command line application?
...
Hi, i have to create a bat file that does this:
1 - If "C:\myprogram\sync\data.handler" exists, exit;
2 - If "C:\myprogram\html\data.sql" doesn't exists, exit;
3 - In "C:\myprogram\sync\" delete all files and folders except ('test','test3' and 'test2')
4 - Copy "C:\myprogram\html\data.sql" to "C:\myprogram\sync\"
5 - Call other bat ...
I have a batch file coordinating the activity of two other batch file. How can I make it execute the second batch file only after the first bat file finishes execution (execute the sequentially). I do not care if the first batch file executes successfully or not.
...
hi,
i use set /p below to read user input
it seems to work outside the if block but the one inside if block doesn't work.
When i run the script second time the user input in the if block prints the previous user input.
test script:
@echo off
set cond=true
echo %cond%
if %cond%==true (
echo "cond is true"
REM the below input doesn't wo...
Hi folks,
I'm using popen in order to send a few commands within a Django app.
Problem is that I'm getting [Error 5] Access Denied, apparently I have no access to cmd.exe, which popen seems to use.
WindowsError at /test/cmd/
[Error 5] Access is denied: 'C:\WINDOWS\system32\cmd.exe /c dir'
I reckon this is because the app sit...
I've spent hours with no luck on this. In terms of cmd prompt, what does the white filled in square with a 1 followed afterwards mean? e.g.
http://i1012.photobucket.com/albums/af249/dororoj/square1.jpg
I've tried using string.find() (using C++) with various hex symbols listed on the ascii table at:
http://web.cs.mun.ca/~michael/c/asci...
hi guys, i have this scripts which extracts all my folder's and files from my c:\projects locations and put its in winrar and transfers them to c:\backup\project
for /f "delims==" %%D in ('DIR C:\projects /A /B /S') do (
"C:\Program Files\WinRAR\WinRAR.EXE" m -r "c:\backup\projects.rar" "%%D"
)
i have also tried the below script whic...
Is it possible to use Eclipse with Pydev without having rights to run programs in cmd? If so, how to do that?
(I plan to teach Python in my school but the studens do not have rights to run programs in cmd.)
\Hokan
...
Hello,
i try to make a loop in a .cmd file.
If test.txt is not exists then i will kill the cmd process.
@echo off
if not exists test.txt goto exit
But this code doesn't work and i don't know how to make a loop every 2 seconds.
Thanks for help.
...
Hi,
I have a .JAR that apparently uses up too much memory, and throws an exception "Java heap space" (or something similar).
So I tried running the .JAR via the CMD like this:
C:\MyFolder>javaw -jar MyJar.jar -Xms64m -Xmx128m
That did not solve the problem. Same error.
Now, when I checked the Processes tab in the windows task manager...
How do I accomplish this:
for /f "tokens=1-4 delims=: " %%a in ('%time%') do set XTime=%%a.%%b.%%c.%%d
I'm trying to get the contents of %time% e.g., 16:25:15.65 into 16.25.15.65.
Running the command above gives me:
The filename, directory name, or
volume label syntax is incorrect.
(If it matters I'm on Windows XP)
...
How do I achieve this in Windows using either Command-prompt or PowerShell?
myprog *
EDIT: I want to call myprog with each file in the current directory as an argument.
...
I have a HUGE file with a lot of HL7 segments. It must be split into 1000 (or so ) smaller files.
Since it has HL7 data, there is a pattern (logic) to go by. Each data chunk starts with "MSH|" and ends when next segment starts with "MSH|".
The script must be windows (cmd) based or VBS as I cannot install any software on that machine.
F...
Ok so I use Avira Antivir (do not comment if you are just going to tell me to get something else) I have the free version and i change the security settings of avnotify.exe, like many people who use the program, so i dont see the nag screen everytime it updates. But it seems they have been updating avnotify.exe when updates run too. so i...
how to change the modifier key from cmd to ctrl in IntelliJ at a Mac?
I have changed it system wide but it hasn't changed in intellij.
...
What I need to do is extract the filename from %%f so I can create the correct dll name.
for %%f in (*.asmx.cs) do (
echo %%f
cmd /c C:\windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /t:library /r:%assemblies% %compileoptions% /out:bin/%%f.dll %%f
)
...
Hi!
I'd like to add custom command-line options to my Java program. Here's an example:
java -cp my.jar package.Main -i input.data -o output.data
How can I achieve this. Currently I only get
JVMJ9VM007E Command-line option unrecognised: -i
Edit: The output of java -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Stand...