4
votes
3answers
115 views

Use DOS batch to move all files up 1 directory

I have created a batch file to be executed through the right-click menu in Win7. When I right-click on a folder, I would like the batch file to move all files (excluding folders) up 1 directory. I ...
1
vote
1answer
50 views

How can I move files into a folder based on their name?

I have several .pdf and .tex-files in a certain folder "ABC". They all are named by the scheme C01S02_Word.pdf C03S02SS01_Description_random_words.pdf C04S01SS02_More_words.pdf and so forth C in ...
0
votes
0answers
33 views

Remotely use a local account to unlock another local account

So I have had an interesting problem pop up. I am trying to make someones life easier by making a script to help reset local accounts on windows 7 machines. Ideally, we'd like to do it remotely, so ...
6
votes
3answers
560 views

Is it possible to automatically run a batch file as administrator

I am wondering whether it is possible to automatically open a batch file as admin when you double click on the batch file, because the commands need to be run with administrative rights. Note: I ...
0
votes
0answers
22 views

How to install the tool(exe) and change settings in it using batch file?

I want to run the installation(which is a single step procedure) of one of the tool(exe file) then in that tool,select File -> Settings and do some settings(select one option(which is a Radio button) ...
1
vote
1answer
124 views

Executing a BAT file as a domain user from a service in Windows 7

Firstly a few basics: I am running a database server application which runs as a service ServiceA. ServiceA is installed on Server1 and Server2 ServiceA only runs on one of the two servers at any ...
1
vote
0answers
267 views

Run a batch file on a remote computer as administrator

I am trying to run a batch file (to install some software) on a remote computer. To do this, I am using PSExec. psexec.exe \\COMPUTER C:\swsetup\install.bat This works fine, apart from some of ...
0
votes
0answers
28 views

assign drive letter via batch fil based on label

I need a script which would change the drive letter to e.g. P:\ of an USB drive named e.g. "MY_VOLUME". I know this is somehow possible with diskpart /s script.txt > output.txt (using: "list volume" ...
0
votes
1answer
36 views

.bat file to create a Library with icon in Windows 7 and 8

Is it possible to create a .bat file that creates a Library with an icon in Windows 7 and 8. Of course this can be done by following the already created tutorials online like Change Your Windows 7 ...
0
votes
0answers
32 views

Prevent Firefox's “Well this is embarrassing” screen from appearing at first login only

My parents have Windows 7, Firefox 30 and two user accounts which they regularly flip between and then shutdown the computer. As a result the "well this is embarrassing" page appears frequently when ...
2
votes
2answers
79 views

Start program, wait until it outputs certain string, then continue

I want my batch script to run a batch script, which doesn't terminate, then run several more batch scripts, which do terminate, and then close the first batch script. The issue is, the first batch ...
0
votes
1answer
267 views

7z in batch file with variables “Incorrect command line”

I'm trying to run the following batch file: set HH=%time:~0,2% set HH=%HH: =0% IF %time:~0,2% GTR 5 ( IF %time:~0,2% LSS 21 ( FOR /F "TOKENS=1 DELIMS=:" %%A IN ('TIME/T') DO SET HH=%%A XCOPY ...
0
votes
1answer
150 views

Script to enable/disable IPv4 on a specific network adapter Win 7

For reasons I don't wish to get in to at the moment I need to occasionally disable Internet Protocol Version 4 (IPv4) on my wireless card, then enable it some time later. Currently I go into the ...
0
votes
0answers
28 views

Get directory by filename

My batch script receives a filename with full path (eg.: C:\...\file.c) as first argument. I need to get the directory of that file and go to the directory, much like: cd C:\...\ How do I do this? ...
0
votes
0answers
160 views

Getting a batch file to run windows 7 psr tool

I'm trying to run the Windows 7 problem steps recorder tool on a remote computer using screenconnect. Screenconnect allows you to quick launch files remotely, so I'm using batch files. The goal is to ...
1
vote
1answer
2k views

Batch File, PING, errorlevel and > null what do they do?

This seems like a really easy question (running Windows 7). But I have looked for the answer and couldn't find anything at Microsoft's sites (XP PING & Everything else PING) or from a bunch of ...
0
votes
1answer
80 views

regulate browser memory consumption

I play a browser-based game that I would like to be able to keep running 24/7 if possible. The problem is that the more the page is refreshed, and the longer the game kept running, the more memory the ...
0
votes
0answers
230 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
148 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 ...
3
votes
1answer
457 views

Disable close button on DOS program in Windows 7

At my company we have stores that run some old DOS software. Before Windows 7 you could run these programs in full-screen and now you cannot. I know there are work-arounds to get in full-screen ...
1
vote
2answers
45 views

Given a list of filenames, how can you iterate through subdirectories and return a list of where those files exist?

I have discovered an old playlist that I'd really like to listen to. Unfortunately, it's one that was created for a USB stick that had music copied out of my collection into a flat folder. What I ...
2
votes
1answer
208 views

How to avoid mkdir path redirected to SysWOW64

I'm tring to create some directories (dirs) using a .bat file. At the cmd.exe, I can create the dirs normally, but when runing the commands inside a .bat file, for some odd reason, the dirs are ...
0
votes
1answer
37 views

Calling an alias in a batch file

I have the following code. I am attempting to change the name server and then reference the command nslookup to use that name server but it doesn't work i.e. it returns the error that nslook does not ...
-2
votes
1answer
57 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
2answers
158 views

How to create a batch file that output file name in txt?

I want to copy the list of all file name into a txt with a bat. For example, if I have a .bat and if I move that bat to D:/123 or anywhere and click on it, I will get a text file with all file name of ...
0
votes
1answer
276 views

Windows 7 - Launch Bat after installation (SetupComplete?)

I'm wondering about a script I made after the installation of my Windows 7 x64 ISO is done. The script (bat) contains this: @echo off cd C:\Users\ RD /S /Q "C:\Users\Public\" cd C:\Users\Unknown\ ...
1
vote
1answer
159 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 ...
1
vote
2answers
53 views

Is there a way to force all child batch files launched from a parent to log into one single file?

Suppose I am calling a parent batch file like this call parent.bat >Log.txt and within the parent.bat I calling other batch files which themselves call other bath files. Now whats happening is, ...
1
vote
2answers
303 views

How do I make a batch file the default application for a file type

I am trying to associate .svg files with a batch file that runs squiggle from batik. When I right click on an svg and select Open With and Choose Default Program, I get the usual window, which lists ...
0
votes
3answers
8k views

Run Batch file as administrator [duplicate]

I created a batch file which stops a service,then stops a process and then starts the service it stopped. When I execute the batch file, it says "access denied". I cannot figure out why it says ...
1
vote
0answers
46 views

Sox not recognised as a command in W7

I just moved from xp-32bit to W7 64bit and re-installed sox which I use to resample and create spectrogams. The batch-file cd %~dp0 mkdir converted FOR %%A IN (%*) DO sox %%A -n spectrogram -o ...
2
votes
2answers
156 views

Automate Windows scanning feature

I have a rather older Canon scanner Pixma MP 110. Of course, Canon does not provide any useful drivers (their site is really desperate, frustrating and useless in all means) - the only software I ...
0
votes
1answer
368 views

windows script to copy text from one file into a new file

I am noob at coding! I am trying to create a windows script that I can copy text from one file into another. My main goal is to find lines in the text with "started processing" and "file". I am hoping ...
2
votes
1answer
139 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
27 views

How to delete contains of a folder with out deleting the folder remotely..?

I don't have AD access, but i have C$ access. There is folder name icon in every profile n almost every system in the domain. I like to delete it. THIS IS THE PATH ...
0
votes
1answer
400 views

How to prevent programs from closing after batch file is executed?

So I have created a batch file that will run upon start-up that is made to run some programs automatically. The programs will all start and run fine, but after the batch file has finished all the ...
1
vote
0answers
191 views

How can I modify the BAT file in this post so it will randomly select 1 background contained in a folder containing multiple backgrounds?

Is there a way to modify the bat file from this post here: How do I set the desktop background on Windows from a script? so that it will randomly select 1 background image from a folder containing ...
0
votes
2answers
85 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 ...
1
vote
2answers
682 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
0answers
25 views

Is there a way to create a script/BAT that changes my desktop image… if so how? [duplicate]

Okay so I just got this program that lets me lock my PC screen (this info doesn't matter much) anyways... You can run files when the program starts/locks and closes/unlocks. What I would like to do is ...
2
votes
2answers
237 views

Ansicon vs. Batch File

I am attempting to make a colored command prompt in Windows 7. Using ansicon, I have successfully managed to create the prompt. However, when I put the commands into a batch file, I receive an ...
-1
votes
2answers
428 views

Avoid running multiple instances of a batch file

I'm running Selenium using Maven through a .bat file from my desktop. Now, when I click for the first time, it runs. How can I avoid it to run when I click again? For example, it should show some ...
1
vote
0answers
92 views

How do I add in a shortcut on the shutdown menu to a program?

I would like to add a shortcut to this menu here: Does anyone know how to accomplish this? I have Windows 7 Home Premium 64-bit SP1 (6.1, Build 7601)
2
votes
2answers
7k views

How do I get a .bat file to run in Task Scheduler at PC Startup?

Alright so I have been reading through the various answers on Super User for this question and no one has seemed to actually post a way of running a .bat file in Task Scheduler at PC startup. I would ...
0
votes
1answer
704 views

How to run batch file without admin privillege? [duplicate]

I am newbie to batch file script.I have created simple windows bat file.The problem is bat file run only if the user has admin privilege.But i want to run this batch file for all users like normal ...
1
vote
3answers
3k 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
255 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
0answers
129 views

How to make ping less verbose

I want to make ping less verbose for my batch script, but I do want it to show time-out messages and other errors. This is what I've got so far: @echo off :BEGIN time /T ping 127.0.0.0 -n 1 | find ...
0
votes
1answer
205 views

Switching between networks with a laptop

I currently switch between three different networks using my laptop. One at home, my office in Sydney and my office in Hong Kong. All three require different network settings and configurations. I am ...
2
votes
1answer
569 views

Start MySQL from the command line without losing prompt

I'm on Windows 7. I'm trying to run a .bat file where I stop and start MySQL and run some other commands. However, running "C:\Program Files (x86)\EasyPHP\binaries\mysql\bin\mysqld.exe" results in ...