Tagged Questions
0
votes
1answer
26 views
needing to iterate through a folder and store documents into a variable
I need to iterate through a folder and collect all the documents and store them into a variable. Im stuck on how exactly to do this process. (has to be done as a batch file)
Currently im here:
...
0
votes
0answers
17 views
how can wmic out put pc name in the domain?
Can any1 help me find what's wrong with this script? I m trying to output the pc name that has certain process running on it. but the output file always empty.....please give me a hint.
@echo off
...
0
votes
1answer
45 views
'forfiles' is not recognized as an internal or external command
I ran the code in Windows 7 and it is working fine... when I run this code in Windows XP, I am getting forfiles not recognized.
call :moveOldFiles D:\coupon\Source\1 *.* %days% ...
1
vote
1answer
28 views
Execute batch instructions sequentially
I have a problem with my batch file (.bat). It has the following lines :
start /d "\\Pcaldatp01\myroute" App1.exe
start /d "\\Pcaldatp01\myroute" App2.exe
start /d "\\Pcaldatp01\myroute" App3.exe
...
1
vote
3answers
38 views
batch command input menu
i have a question . It is possible to make a batch menu to accept multiple commands at the same time?
Example : ( my code )
@ECHO OFF
set tries=6
:top
cls
set /a tries=%tries% -1
if %tries%==0 (
...
0
votes
2answers
39 views
Increase number in string in bat file?
How can I increment the value of an int in a string ?
Say I have foo-815-bar. I'd like to have foo-815-bar.
foo and bar can be constants (although if bar can be an unknown variable, it would be ...
0
votes
1answer
131 views
How to create Backup Batch file that copys only modified files & delete the dest files/folders that do not exist in the source?
I want to create a backup Batch file that meets these requirements:
Requirement:
1-Only copy the source files if the source file got modified.
2-If the destination contains the files/folders that ...
1
vote
1answer
59 views
Cannot write result of batch file processing using DOS START command
I have a batch file which will run multiple programs using DOS start command. However, I could not write the programs' result to their respective text file.
start program1.exe > result1.txt
start ...
0
votes
1answer
58 views
How to log input and output of a batch file to a text file?
I have created a batch file with 2000 lines of code and which will peroform various operations in my daily work. For this batch file I have to give some inputs to enable/disable some of the ...
1
vote
2answers
234 views
Batch File > Javascript > WinSCP > Check if file exists
I have a batch file that will launch a .js file which, via WinSCP, checks if a file exists and returns to the batch file if it does or not.
The problem IS: It always returns not found, and I cannot ...
1
vote
1answer
73 views
Merge multiple text to text file based on filename batch
hi guys i have some problem with my batch. i want to create batch that can merge multiple text file to one text file but it must based on 2 first character of the filename.
so it will be like this
...
0
votes
1answer
64 views
Batch convert all files in a directory with spaces in filename
I've done this batch file that should convert all mp3 files in given folder but, I dont know why, it doesn't work...
Here is the code:
@echo off
title Converting...
set ...
3
votes
1answer
76 views
DOS Batch that sends email via outlook: need to add new lines
Here is part of my batch:
start "" "C:\Program Files (x86)\Microsoft Office\Office12\OUTLOOK.EXE" /c ipm.note /m "email address&cc=email address 2;email address 3&subject=Very Important ...
0
votes
3answers
68 views
batch_ Loop line in a file and check if a line begin with “#”
hi mate i have to a script .bat for windows shell.
i have this file:
line
line
#line
line
#line
I want to read the file line by line, and if the line begin with "#" i don't do anything else i do ...
0
votes
0answers
109 views
find & replace text using batch file
import java.io.*;
class hello {
public static void main(String args[]) {
System.out.println("shhhhhhhhshhhh");
}
}
I want that this Java program extracts "hello" text and replaces it with ...