0
votes
0answers
20 views

Batch file - Copying folders with percentage

I'm currently trying to create a batch file, which actually copy a folder from a server to a clients machine. And I'm playing around with batch file, using xcopy, and it gives me the percentage of ...
0
votes
1answer
33 views

How to access cmd of another computer from my computer's cmd?

How can I access the Command Prompt of another computer from my own computer's Command Prompt in Windows7? I am hoping that I can do something like that into a batch file: Enter \\ComputerA -u John ...
0
votes
1answer
37 views

How do I write a batch script that iterates through all png files in all subfolders and does an action?

I'm looking to build a small batch script that executes the command line of pngout.exe So far I've got only this down for %i in (*.png) do "g:\myfiles\_pngout.exe" "%i" /s0 /c6 However, for that ...
0
votes
1answer
15 views

How to pass CLIs in a remote linux server from windows batch script?

I am able to connect to a remote linux server by using start C:\Users\pankmish\Downloads\putty.exe -ssh stag -l username -pw password But Now i am trying to give linux CLIs from same batch ...
0
votes
0answers
25 views

Batch Script related issue

I have written following script which works absolutely fine on my system. @echo off setlocal enabledelayedexpansion FOR /F %%i IN ('wmic /node:%1 computersystem get Name') DO SET A=%%i FOR /F %%i ...
0
votes
1answer
35 views

I'm trying to run a batch file that test for 4 different files then based on the correct file present it runs the correct command

:: batch file to run backup @echo off setlocal set backup1=="F:\my backups\Disk_1_DataBAckup" set backup2== "F:\My backups\2_backup_data_to_disk2" set backup3=="G:\my backups\3_backup_data_to_disk3" ...
0
votes
3answers
38 views

How to read values in a particular column of a CSV file in Batch?

I am planning to write a batch script wherein I need to scan the values from a particular column of a CSV file one by one and store them in a variable for further processing. Say, following is the ...
0
votes
4answers
64 views

Batch Script to find out whether a host is up or down

I need to scan several systems in the network within IP range 172.18.x.x to 172.25.x.x and check whether each of them is active or not, and then dump the result in a file. Following is the script: ...
1
vote
0answers
42 views

Nested environment variable does not expanded

I can't explain the below strange issue. I have two system variables: PYTHONHOME = D:\Tools\ISDC_Tools\Scripting\Python.2.7 PYTHONPATH = %PYTHONHOME%;%PYTHONHOME%\Lib After creating a new cmd ...
0
votes
2answers
74 views

Changing Windows 7 Desktop Background

i've been searching online for a batch solution to change the desktop background of Windows 7 Ultimate 64 bits, and after several attempts, i could only get it to work once but never again... I'm ...
1
vote
1answer
111 views

run .hta as adminstrator

Simple question how do you run a .hta file as an admin? When I try running runas /user:Grants-laptop\administrator computerinfo.htafrom command line I get this error: RUNAS ERROR: Unable to run - ...
-2
votes
1answer
34 views

Batch file test for path + file name with extension

Batch file in Windows 7. I want to know how to test for a path + file name with an extension, if it exists or not. I have tried if exists "myfile.ext" It seems not to see the file. Your ...
0
votes
3answers
99 views

Get administrative right in windows command line [duplicate]

I am not trying to do cheeky things, but my need is just to have two scripts for adding or removing IP routes using the following command in batch scripts: Add route: @echo off route add -p ...
0
votes
2answers
37 views

get part of the path in recursive operation

I have a directory tree like this c:\work\src\A\D1\foo.txt c:\work\src\A\D2\foo.txt c:\work\src\B\foo.txt I want to run the stream editor (sed) for each foo.txt and replace some text with sed. The ...
1
vote
1answer
63 views

Win7 Task Scheduler Won't Run Copy Commands

I'm trying to run a patch file every morning at 4am. For whatever reason, the lines in the batch file that use robocopy.exe are skipped. I've also tried xcopy and cp(from UnxUtils). The batch file ...
1
vote
1answer
75 views

How do I create a .bat to logoff a specific user from your pc?

Running remote desktops that are acting as specific users on Win7x64. The main username I'm using is Server. And the rest are as follows hh1 hh2 hh3 etc. Basically these handheld remote desktop ...
4
votes
2answers
105 views

Why is the “Run as Administrator” checkbox disabled?

I have a .bat file that cannot allow me to set it to run as admin as required by going to the Properties box and check for Privilege checkbox. But mine is disabled as below snapshot. What can I do ...
0
votes
1answer
97 views

Using START /wait with MozBackup batch scripts

OS: Windows 7 64-bit I have three batch files. FirefoxBackup.bat ThunderbirdBackup.bat Firefox_Thunderbird_Backup.bat The script inside Firefox_Thunderbird_Backup.bat is shown below: @echo off ...
0
votes
1answer
69 views

Send msg on skype with batch file [duplicate]

How can I send messages to my friend on skype with a batch command line? i've tried, but is used to send images or other media. "C:\Program Files\Skype\Phone\Skype.exe" /sendto:XXXXXXX Test
1
vote
2answers
57 views

Stop a “completly hidden batch file”

I'm running Windows 7 64 bit Home Premium. My new internet connection is a bit buggy, and I need to keep reconnecting. To make sure my computer keeps connected while I'm away, I created a script that ...
0
votes
1answer
120 views

writing a batch file: having a batch insert a command into another cmd-based program

i'm trying to have my batch open another cmd based program, wait some time, then input some commands into the cmd-based program, but can't find any documentation on how to do it. this is the batch ...
2
votes
2answers
146 views

Can I turn Caps on/of from a batch file in Win 7?

I have a very old program that needs the commands to be all caps. when I exit this program I often forget to put the Caps Lock off (very annoying). I had a batch program in XP that did this but can't ...
1
vote
0answers
65 views

Task doesn't complete if it is run by System (so it's hidden)

I'm making an application using Python to parse a webpage. For reference, this is the program's code: import csv from selenium import webdriver from selenium.webdriver.common.keys import Keys import ...
0
votes
2answers
77 views

Concrete cases for CMD/BATCH use [closed]

Please excuse my inexpertise. I don't have much experience with the command line. From my searches, the main reason for CMD use(*) is automation. I haven't, though, found concrete cases. Most ...
0
votes
0answers
247 views

Windows batch “rmdir /s /q” empty a folder but it is still there (but 0KB) and can't access

I use Windows 7 x64. I have a svn checkout Working folder, say "Working". When I use a batch file or just open CMD, I did del "%currPath%\Working" /s /f /q rmdir "%currPath%\Working" /s /q The ...
2
votes
1answer
385 views

Run batch file through Windows 7 scheduler to rename folder on network drive

I'm trying to do what I believed would be very simple: have a .bat file that rename two folders on a network drive. The script works fine when running from prompt, but not from the scheduler. Any ...
1
vote
1answer
137 views

How do I change the power plan using batch

I would like to know how to change the power plan in Windows 7 to high performance using a batch file. I am making a program that boosts pc performance.
2
votes
0answers
94 views

How could I disable windows effects through batch

Is it possible to disable these options shown in the picture below using a batch file. I am making a program that can boost a computers performance can any one help. my OS is windows 7 32bit.
0
votes
1answer
131 views

How do you boot to a seperate drive that is cloned , for the purpose of a backup system partition?

I use Acronis to Image clone the system partion (OS) to a seperate drive (not disk clone). oops just the partition The purpose of the seperate drive with system partition cloned, is to be able to ...
0
votes
1answer
56 views

Batch file to edit users path

I have a batch file that I got from another post in this forum which edits the user's path but it bombs if the path contains any Program Files (x86) entries that are common on windows 7 machines. Any ...
2
votes
1answer
148 views

Batch file commands to trigger Add/Remove “Repair” action?

I have an Outlook add-in which occasionally is forcibly deactivated by my IT department periodically. I also have a batch file I run after logging in which accounts for various other discrepancies ...
2
votes
1answer
83 views

Unbalanced Parenthesis in a for loop in batch

@echo off FOR /l %%A in (0,1,30) do ( set /a results=1600 + !RANDOM! %% (1900 - 1600 + 1)echo %%A--!results! ) When I run this I keep getting error "Unbalanced parenthesis" in windows xp and when I ...
0
votes
1answer
125 views

forfiles.exe not working for c:\users\internet\downloads or documents

I am getting could not find c:\users\internet\downloads\new.txt when i run the script in cmd is it because there's a lock icon on the user account on windows7, the script works fine if i change ...
0
votes
2answers
74 views

.bat file overriding answer

When I made this batch file, when typing y and n for the first time it works fine, but as soon as I choose n, every single time I try inputting something, it opens up the 7000 songs wpl list then ...
0
votes
0answers
30 views

Win7 wallpaper rotation disrupted each time

I hope that your expertise can also support in this case. This has been bugging for a long while now. I have a question about influencing the Win7 wallpaper rotation via batch or other code. The issue ...
0
votes
0answers
201 views

Windows Batch Script Generates runtime error R6016 - not enough space for thread data

I am running a Batch Script that is 1 FOR /F %%i loop and it is currently running over 5k files totaling 62mb. I am using Windows 7. The error doesn't generate everytime I run it. It seems to only ...
1
vote
2answers
306 views

Batch script to remove # from a file name (only in a specific directory)

I'm looking for a script to remove the # character out of any file names in a specific directory (PDF documents). I've been looking at some similar examples, but it's all a bit confusing!
0
votes
1answer
76 views

Build a user's profile directory on creation in batch

I have a batch script that I use when I set up new Windows 7 PCs that creates a user based on a variable, creates a folder on their desktop, then shares it: @echo off SET /p unitnumber="Enter ...
1
vote
2answers
2k views

How to create a desktop shortcut from a batch file

I know there are many posts on this issue but there is a minor twist to what I need to do. I can figure out how to create a shortcut with an argument like this: "C:\Program Files\My App\App.exe" /s ...
0
votes
0answers
155 views

Using arrays in batch script

I want to read a text file and store each line in an array.When i used the code below, "echo %i%" is printing 0 every time and only array[0] value is getting assigned.But in "set n=%i%",n value is ...
0
votes
3answers
545 views

Batch repacking zip archives into 7z

I have many zip archive files that I would like to re-pack into 7z archive format, as that would save me a lot of space. How do I batch-repack those files on a Windows 7 computer? I tried doing this ...
1
vote
1answer
151 views

inkscape not working from command prompt

I was looking at the answer to the question (converting EPS to PDF) where they suggested using Inkscape to convert EPS to PDF images. I need the exact same thing. Using the GUI, it works like a charm. ...
1
vote
3answers
1k views

Batch File Check Directory exists in x64 and/or x86

I need to be able to run this batch fine on both x86 and x64 machines to check if a program has been installed correctly . We have an app that installs in x86 in the standard program files directory, ...
1
vote
1answer
182 views

Make a bat file want for a program to be running then launch another one

I am currently trying to create a batch file that launches some programs for me. This could easily be done with the command "start" but the last program it runs only works if the first one's window is ...
0
votes
1answer
203 views

How to create batch file that delete files by words at the end of file name (using a list of words)?

I have a directory with thousands of html files scattered across several subdirectories. I need to delete all files matching any one of many criteria. All criteria are similar by kind. The file names ...
1
vote
1answer
304 views

Set environment Path Windows 7

Trying to add stuff to the system environment Path via batch, vbs or anything really. This used to work in a .bat, but has stopped: setx -m path "C:\addtopath;%PATH%" This used to work in VBS, ...
0
votes
0answers
72 views

cmd/batch setx not to evaluate any paths

When I set a new path like so: setx -m path "%%SOME_HOME%%;%PATH%" The %PATH% part will expand any existing % into the actual path. I want it to set: %SOME_HOME%;%GIT_HOME%;C:\program.exe NOT ...
-1
votes
1answer
220 views

I need a batch file that will be able to restart an EXE when the EXE only uses 10% cpu usage

I have currently been using this. @echo off set serverName=Server Restarter title %serverName% :restart TIMEOUT /T 900 taskkill /F /IM ServerLauncher.exe /T goto restart EDIT! Right now I have ...
1
vote
2answers
3k views

Set-ExecutionPolicy using batch file + powershell script

I'm working on my dotfiles and I'm wanting to create a batch script that will do some initial setup for me when switching to a new computer, like using psget to install modules, etc... I'd also like ...
0
votes
1answer
58 views

Create user account for current logged in user

We have over 100 users that need to be made users on their Windows 7 machines. It's very easy to write a script using net user, but it doesn't get us a level of automation we need. I would like to be ...