Tagged Questions
0
votes
0answers
3 views
Copying and renaming a file into the proper subdirectories
I have a particularly tricky batch scripting request. I have a file/folder structure like this
/mapcfgs/
/folder 1/
somefile.new
somefile.old
/folder 2/
someotherfile.new
...
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
1answer
54 views
Extracting IP from ping into variable in bat script
is there anyway i could do this?
@echo off
REM #Testing FIND in IPCONFIG
setlocal EnableDelayedExpansion
for /f "tokens=3" %%a in ('ping localhost ^| findstr /i "reply"') do (
set address=%%a
...
0
votes
1answer
13 views
Calculating A Percentage Of System Ram With Batch Script (Using In Dynamic Memory Management Modification)
So I think I have this correct but for some reason it's not reading from the output file "ram.dat". Can anyone find the error in this?
@echo off
set percent=90
:ramcalc
cls
if %percent% GTR 90 Echo ...
1
vote
2answers
17 views
batch script - map network drives by computer name
I am trying to modify a current script that is executed as logon script by domain GPO. I have a special case where if users log into a specific machine on the domain, I need to map different network ...
0
votes
0answers
19 views
Task Scheduler randomly not running scripts, reports them as complete
I have a windows server 2008 r2 virtual machine that is set up to run various tasks at night, it reads from a database creating CSVs and copies files to and from locations on other disks. All tasks ...
-2
votes
2answers
78 views
Windows variable in C# [duplicate]
How to get windows environment variabe in the C# code.
I have a windows startup script to set the environment variables.
I need to pass this variable to C# code..something like %var%
e.g. in the ...
0
votes
2answers
28 views
How to insert a new path into system path variable if it is not already there
I'm using the below command to append a path to windows system PATH variable :
setx PATH "%PATH%;%ProgramFiles%\MySQL\MySQL Server 5.5\bin"
It works fine.
My question is:
How to append a path ...
0
votes
2answers
56 views
bat script working on windows 7 but not on windos 2k8
I have a script which works on windows 7 but not on 2k8 throwing up an exception of file not found.
@echo off
REM #Testing FIND in IPCONFIG
SET VIPTHATWORKS="11.11.11.11"
SET ...
0
votes
2answers
39 views
Python or VB script to run a batch file in background even the user logged out in windows [closed]
We need python or VB script code to run a batch file in background even the user logged out the system. The script should run always irrespective of users logged in/logged off and machine reboot.
I ...
0
votes
3answers
33 views
Windows batch script to unzip files in a directory
I want to unzip all files in a certain directory and preserve the folder names when unzipped.
The following batch script doesn't quite do the trick. It just throws a bunch of the files without ...
0
votes
0answers
39 views
passing in a path to a directory (with spaces) to a jar file not working
I have a batch file that does simple string replacement. It takes in 3 arguments: the string I want to replace, the string I am replacing it with, and the path to the file. The file ultimately passes ...
0
votes
3answers
37 views
How to check if a file is existing or not using batch
I have a written a script to check if a file is existing or not and send me a mail on this. But its not working properly. Really appreciate if any suggestions or solutions provided..
My script is as ...
0
votes
1answer
36 views
How can I cd into a directory that i created before in my batch file?
it's the first time that I write a little script in batch, I need to create a folder named like the date, then I want to go in that directory and run the dump of my database. Here my code:
cd ...
0
votes
3answers
65 views
Changing tag data in an XML file using windows batch file
I have an XML file with several tags in it, and I am trying to change the contents of one of these tags with a batch script.
An example of the xml file is:
<ConfigurationData>
...