Tagged Questions
0
votes
1answer
47 views
how to find input (“hello world”) individually in xy.txt
I'm trying to make a batch file which checks if the user input does exist in xy.txt well thats easy
but now if the user input is "hello world" i want to check each word individually.
i tried that..
...
-1
votes
3answers
39 views
How to execute DOS command using java on SERVER side using Google App Engine?
I am developing a Project on Google App Engine, which will execute DOS command on Server Side and mail it to specific user.
Here is a sample code which I am using to execute dos command using JAVA.
...
0
votes
1answer
43 views
How to make the batch file smarter
I'm trying to make a batch file which checks if the user input does exist in xy.txt
well thats easy
@echo off
set /p input=" "
findstr /c:"%word%" xy.txt > NUL
if ERRORLEVEL 1 ...
0
votes
2answers
26 views
Batch - Loop through folders and run command
I am trying to remove Dropbox from around 500+ Windows 7 computers using a batch script. Dropbox is installed on a per-user basis under "%APPDATA%\Dropbox".
To uninstall silently you have to run ...
0
votes
3answers
42 views
Powershell replace - how to avoid linebreaks at 80 chars
In a batch file I need to change, within a file, all instances of ##token## (just my own placeholder) with the value of a variable from earlier in the script (%tokenvar%), and output the result to a ...
2
votes
2answers
31 views
TYPE command issue - batch file
hi I am trying to use TYPE command to save output to the file for example:
type %Destination%\buildInfo.xml >> Logs\%Envlog% %Date% %Time%
where Envlog = logging.log
this is not happening ...
-1
votes
0answers
16 views
Command that helps in moving command generated files into folder
I have a Python command that generates some files, and I want to move these files directly into another folder without running another command like MOVE or XCOPY etc.
0
votes
0answers
25 views
How can i set this path in java?
I want to execute a batch command via java.
how can I do that ?
"c:\windows\system32\net use s: \192.168.1.160"\100 Gelem 1" /user:xxx xxx"
this one actually works on windows command prompt
the code ...
2
votes
2answers
77 views
how to save vbs in batch file one command in multiple lines
I would like to save a vbs file in a batch file like this:
echo set shell = createobject("wscript.shell")
wscript.sleep(1000)
shell.sendkeys("blablabla")
Shell.SendKeys "{Enter}"
wscript.sleep(1000) ...
0
votes
2answers
50 views
Execute command using Java on Windows
I want to execute a command mspview -r "C:\\Users\\SS\\Desktop\\phantomjs-1.9.2-windows\\image.tif". How can I do it via Java code? I am trying to do this with a batch file. The same command when I ...
0
votes
1answer
42 views
Copying files and keep duplicates
i have a list of pdf file links from different folders.Is there a way to copy these files using a batch file to another folder and keep duplicate files? example below.
from
C:\my folder\file1.pdf
...
0
votes
0answers
20 views
Start IE 10 in IE7 and IE8 mode with batch commands
Is it possible to start a .html page with IE10 from the batch command open two tabs, each one in IE7 and IE8 mode, respectively? Where can I find what argument does IE accept?
0
votes
2answers
67 views
Run command A, then command B in Command Line
I have a problem with a following command:
DSQUERY group -name "Marketing" | dsget group -members |
DSGET user -email & DSMOD user -tel 00000000
What this is supposed to do is to list the ...
1
vote
2answers
299 views
Windows Command batch script to add filename to end of each row in a merged text file
I a new to windows command line scripts.
I have a batch file which i use to merge multiple text files into one. However i want to be able to also add the name of the text file the row comes from to ...
0
votes
2answers
185 views
Disabling ethernet connection with command line?
I have seen many 'disable wireless with command line' posts, but not about disabling ethernet with command line.
Is it possible to do so? (windows 7, 32 & 64 bit)
Examples of command line for ...
-2
votes
1answer
67 views
batch, Create specific folders from specific multiple files, and then move specific multiple files into specific folder
I have problem I have some files
07-01.jpg 07-02.jpg until 07-48.jpg
08-01.jpg 08-02.jpg until 08-48.jpg
....
37-01.jpg 37-02.jpg 37-03.jpg until37-48.jpg
I want to create folder 07, 08.... ,37 ...
1
vote
3answers
128 views
how to pass input to .exe in batch file?
I have a .exe which requires 3 integers as input. For example:
myCode.exe < input.txt
In input.txt:
2
3
8
Now I want to put the command in a batch file. how can I write the batch file?
...
0
votes
0answers
35 views
Batch File input from output
I would like to make the output of a command (imagex) to the input of a different command.
How do I use the output of imagex to be the input of a different command. Say I only want the image count or ...
1
vote
2answers
42 views
Batch to segregate files according to name length
I got files as follows in folder fol1:
wsd.11
fmsd.12
wsd.102
fmsd.203
typo
echo
I want to move files which have tow digits i.e. wsd.11, fmsd.12 to folder fol2,
also i want to copy typo and echo to ...
0
votes
0answers
103 views
How to run a .bat file in elevation mode from a command prompt [duplicate]
i have a .bat file which must be run in elevated mode (Run-as admin) to work properly. And my goal is to run this bat file from normal command prompt with elevation. can someone tell the command to ...
0
votes
1answer
168 views
Create batch to archive files using main folder name for archive name
I am trying to create batch file and couldn't find solution anywhere on the web.
I would like to archive (Winrar) folder&subfolders (eg.Folder A in C:\Temp\A). Folder A has a bunch of subfolders ...
1
vote
2answers
107 views
Output of DIR command not as expected in batch file
I have a large collection of television series sitting on a NAS box, that shares media via samba and dlna throughout my home. To enable a random feature, I created a batch script as follows to make a ...
0
votes
2answers
37 views
VBScript delete characters from variable
I have this script
a=inputbox("Wat is het IP adres van de VPS?")
Set oShell = WScript.CreateObject ("WScript.Shell")
oShell.run "cmd.exe /C netsh interface ipv4 set address name=Wi-Fi source=static ...
0
votes
1answer
101 views
Get two different outputs from a ping request in a batch file
im working on a script that is supposed to sort out ping requests.
@ECHO OFF
FOR /L %%i IN (60,1,254) DO ping -n 1 10.100.121.%%i & IF %%i==Reply (
ECHO 10.100.121.%%i>>c:\Test\Online.txt
...
0
votes
2answers
82 views
Command to delete a file wihch is two days older [duplicate]
what is the CMD command to delete the files which is two days older from a particular folder when we run a batch file?
0
votes
2answers
150 views
How can I remove quotes from forfiles variable fname
Can anyone explain me how to do this?
Problem is @fname contains quotes so concatting %source% and @fname gives an error...
forfiles /P "%source%" /M %file%.* /D -1 /C "cmd /c if exists ...
-1
votes
1answer
52 views
How to find MB disk size and crate list of variables
I'm trying to automate the re-partitioning of many machines using easus command line utility.
I can make batch files but I think I'm out of my depth when playing with wmi.
My Goal is to find the size ...
1
vote
1answer
225 views
copy files of multiple folders and rename them with cmd
i have list of folders
files in all the folder are named in the same way
I want copying them in one folder without losing the order (folder 01(file01-02...) to folder 10)
I didn't find the way to ...
0
votes
1answer
95 views
How to write commands on second level of command prompt
If my batch file looks like this
cmd
exit
Then I call this batch file from command prompt
I want cmd to open another level of prompt and exit from there
But whats happening is that after it goes ...
1
vote
1answer
175 views
Windows, Command, Batch and Automated Folder Icon Changer
REALLY need some help! Been trying tirelessly for weeks...
This script will change the attributes of all sub-directories then using the icon located within \Icon of sub-directories will create a ...
0
votes
1answer
33 views
copy specific value from text1 to text2 by dos
I need help to copy a specific value from text1 to text2 by dos batch.
Text1 like that;
20130701,xxxx,xxxx,xxx
20130702,yyyy,yyy,yyyyyyy
I want to copy only "20130701" line from text1 to text2, ...
0
votes
1answer
44 views
Check the machine is accessible or not using command
I have batch file in which i am restarting a machine and want to check if machine is back online then execute the code block else after particular time inform the user the machine is not online
I ...
0
votes
2answers
221 views
Check for particular DotNet version & install if not found in remote machine
I am creating a batch file to check for a particular dotnet version & install if not found on a remote machine.
For executing commands on remote machine currently I am using psexec.exe.
Using ...
2
votes
2answers
101 views
Xcopy command in batch
xcopy %SOURCE% %DESTINATION% /E
Using above command am copying folders and files from source to destination.
While copying, its showing source destination of the copied/copying file in the batch. I ...
0
votes
1answer
87 views
How to launch application after server startup using batch file?
@echo off
set START_SERVER="C:\Program Files\Apache\Tomcat_6\bin\startup.bat"
call %START_SERVER%
start http://localhost:8080/MyProject/
How to launch app in browser after server start using batch?
...
1
vote
2answers
958 views
Will setx command work in windows xp?
@echo off
SETX -m JAVA_HOME "C:\Program Files\Java\jdk1.6.0_31"
pause
I tried setting javahome using setx in windows xp with the help of batch file. but it didn't work
will setx work in windows ...
1
vote
2answers
63 views
setlocal enabledelayedexpansion in batch file
setlocal enabledelayedexpansion
FOR /F "skip=2 tokens=2*" %%A IN ('REG QUERY "HKLM\Software\JavaSoft\Java Development Kit\1.6" /v JavaHome') DO set JavaPath=%%B
SETX -m JAVA_HOME "%JavaPath%"
ECHO ...
0
votes
1answer
49 views
Setting CATALINA_HOME by another batch file parameter?
I have two batch files. first.bat and test.bat
first.bat:
@echo off
SET START="C:\Users\Neonous\Desktop\test.bat"
call %START% "C:\Program Files\Apache\Tomcat_6"
test.bat:
@echo off
set ...
0
votes
1answer
81 views
Check folder is empty using batch command?
for /F %%i in ('dir /b "C:\Program Files\Apache folder\*.*"') do (
echo Folder is NON empty
goto launch_app
)
How to check a folder is empty?
I tried above command, but it didn't work.
1
vote
2answers
206 views
How to split string using batch file?
How to split string using batch script?
SET java_path="C:\Program Files\Java\jdk1.6.0_31"
above is my string, i want only "C:\Program Files" from java_path. how to get it?
0
votes
4answers
387 views
Get java installed path using batch file? [duplicate]
I need to set JAVA_HOME variable using batch script
Tried below codes, but no use.
for /f %%j in ("java.exe") do @echo.%%~dp$PATH:j
the above script gives empty
FOR /F "skip=2 tokens=2*" ...
0
votes
1answer
100 views
How to copy war file into a particular destination using batch command?
SET src="C:/Users/Neonous/Desktop/New folder/Package/Project-1.war"
SET dest="C:/Program Files/Apache/webapps"
xcopy %src% %dest% /E
I tried the above script to copy war file. its extracting and ...
2
votes
4answers
402 views
Get java version from batch file
How to get java version and want to get '6' out of java version from batch file.
I tried below script, but it didn't work.
REM check java exists using JAVA_HOME system variable
if "%JAVA_HOME%" ...
0
votes
1answer
140 views
Change password for all users accounts in command prompt
Alright, I need something of a batch scripting guru to help me out of the corner that I've backed myself into.
I have a program that runs as system and I want to change the password for all the ...
0
votes
2answers
173 views
Passing argument from batch script to PowerShell script fails
I am trying to find out a solution by passing the REPLACE command through the batch file as the "ReplaceTagsOnConfigFiles.ps1" will work when the file is executed with REPLACE option or otherwise, it ...
1
vote
2answers
75 views
Batch: During my code loop it stops setting a variable. All Help Welcome
goto time
:time
set tm=%time%
set hh=%tm:~0,2%
set mm=%tm:~3,2%
set ss=%tm:~6,2%
set ms=%tm:~7,2%
goto date
:date
set dt=%date%
set wd=%dt:~0,3%
set mh=%dt:~4,2%
set dy=%dt:~6,2%
set yr=%dt:~8,4%
...
0
votes
3answers
46 views
Batch: I need some fresh eyes to see where the error is
I keep getting a Missing operand error. I cant seem to find it and I figure a new set of eyes can.
@echo off
title Log Split And Backup
rem dt = date
rem tm = time
rem wd = week day
rem mh = month
...
1
vote
1answer
44 views
Batch: Trying to get a command to execute at a specific amount of seconds
This works for hours, running in a loop as soon as it hits 13 hours it executes.
@ECHO OFF
:time
echo %time%
FOR /f "tokens=1*delims=0" %%a IN ("$0%time:~0,2%") DO SET /a HH=%%b
IF %HH% equ 13 goto ...
0
votes
2answers
64 views
Batch: I want to call a command after 5 am yet it outputs it less than 5 am no matter what
Neither
@echo off
set hh=!tm:~0,2
set mm=!tm:~3,2
set ss=!tm:~5,2
set ms=!tm:~7,2
if !hh! gtr **5** (
echo gtr 5
pause
goto success
)
pause
goto fail
:success
echo Success!
pause
...
0
votes
1answer
63 views
How to save the CPU percentage of a certain process into a variable in Batch?
I have a small batch script here that gives me the percentage of a certain process (Server.exe in this example) and I have a weird bug where it cannot parse the command output to a variable.
Here is ...