0
votes
1answer
16 views

Windows Batch - Move files to folder parent & Remove empty subfolders

I found several such questions and tried to adapt the answers to my needs but no luck so far. Im trying to create two context menu entries in Windows 7 that would: Move all files from ...
0
votes
0answers
6 views

SOLVED: runas /savecred error 1311 no logon server

Computer: Windows 8.1 Pro on company domain I have a program that needs to be run occasionally for testing purposes, and is installed and uninstalled regularly. I am not a domain administrator, and ...
1
vote
0answers
16 views

.bat script doesn't work by using window scheduler

i created a .bat script to perform daily folder compression. it is working fine when i double click the .bat file. However, it doesnt work when i include it in window scheduler. Below is the script: ...
0
votes
1answer
20 views

enable/disable a device using command line instead of device manager

Is there any way to write a batch file in windows to read the status of a a device and enable it if it is currently disabled? Problem is, some times when I start the windows, the audio device is ...
0
votes
1answer
18 views

Assigning a Windows environment variable to a batch variable?

I can't seem to assign an environment variable to another one inside a batch script. For example, this will work: set varA=C:\this\is\a\directory and I can happily use find /I "MyString" %varA% ...
0
votes
0answers
14 views

Prefix commands in batch

I am using a batch file to run Grunt with some console customization. I was wondering if there is a way to add grunt and a space to the commands I enter into the console. Here is my batch file: CD ...
0
votes
0answers
15 views

What's the equivalent of Wevtutil in XP or 2003?

I have a batch file for saving event logs to our shared drive. I want to do this for XP and Server 2003 without very much effort. What could I use since Wevtutil is only on Vista and up? rem Script ...
0
votes
1answer
46 views

How to start a cmd window and issue tail request in a bat file?

I can open a cmd window and start a tail by entering something like this: tail -f C:\Oracle\WebCenter\Sites\11gR1\Sites\11.1.1.6.1\logs\sites.log This is probably a stupid question, but how do I do ...
0
votes
0answers
15 views

NDIS driver batch installation on Windows 64bits

I want to update a BATCH script to install an NDIS filter driver on Windows Seven (32/64 bits) and above, the script use snetcfg on Windows XP 32bits, and I would like to know if snetcfg is still an ...
1
vote
2answers
63 views

CMD copy specific file types from one location to another

Hi guys im currently working in a school and Ive created a script to scan all student folders for sepcific file types, I was wondering if there was a way I could have it make a copy of the specific ...
0
votes
1answer
21 views

Passing optional parameters in a batch script

I'm trying to write my first batch script and trying to understand how to pass arguments. It's a very simple command which runs fine in cmd. Command: C:\Program Files\Foo> myexe -sd tempVar ...
0
votes
2answers
32 views

Use batch script to check if file is hidden

I'm writing a batch file that will unhide and run another batch file or, if the file is already unhidden, will run the batch file and hide it again. How do I check if a file is hidden?
0
votes
0answers
22 views

How can I start a batch script before open some type of file?

I'm writing some custom lock file system for my company. I want to start my lock_engine.bat before open some type of file. for example here my bat: @ECHO OFF set FILENAME=%~nx1 echo. is locking ...
1
vote
1answer
45 views

Deleting all but latest revision of a file

So I have these massive lists of drawings that I've done for work and I'd like to be able to dump them all into one folder and run a batch that would delete all of the older revs and leave the highest ...
1
vote
2answers
43 views

CMD delete specific files and log all output

Hi guys ive written a script for a school im working at to automatically mount a folder as drive X: and then to go into drive X and recursively scan all folders and sub folders for .bat .cmd .exe and ...
0
votes
0answers
10 views

Launch Windows application/run script on email

So, I've been trying to make a way for my game server (Minecraft running McMyAdmin, specifically) to turn on when my computer receives an email, as I don't necessarily want the server to be running ...
0
votes
1answer
33 views

Batch file in windows scheduler

set PATH=C:\Users\... call date2.cmd md %DT_MM%-%DT_DD%-%DT_YYYY% cd %DT_MM%-%DT_DD%-%DT_YYYY% So, I set my path to the folder that has PSFTP for me to run and run a file that will get the current ...
0
votes
1answer
40 views

How to run a Batch File at Windows Login?

All the search results out there show about Windows Startup only!! I wish to start a batch file at User Login Session in Windows environment.
0
votes
1answer
55 views

Windows batch file - How to pipe output to text file and then open the text file?

I have a weird problem where I have a simple batch file that runs another batch file, outputs what is on the screen to a log file, and then attempts to open the log file. The problem is, the log file ...
1
vote
0answers
23 views

Appending filename and path in Batch file

I'm having a hard time learning how to use command lines and the using batch files. What I want to do is write a custom path and then add the filename so that the output could be saved there. This ...
0
votes
1answer
52 views

Batch Issue - Creating folders and Moving Documents

Iā€™m trying to create a batch script in Windows 7 that will look at the first 6 numbers of 100s of pdf, create a folder based on the 6 unique numbers and move the pdfs into their respected folders. ...
0
votes
1answer
27 views

Batch file XCOPY cannot find existing directory

I'm writing a small batch file to copy my C# project to another drive. I'm using XCOPY to copy an entire folder (We have some XP machines still, so robocopy isn't an option). However, when I run the ...
0
votes
1answer
35 views

Why did running this script as administrator cause it to create a 1GB folder?

A batch script designed to copy another batch script to users' Documents folders in Windows had the undesired effect of creating a ~1GB folder in one user's Documents folder when he ran it with ...
1
vote
2answers
83 views

Batch command for Searching & Replacing Text in a Text containing non-TXT file

I am working with iMacro JavaScript .js files which are simple unencrypted lines of code-like text. The file contains the following code: var i; for (i = 1; i <= 10; i++) { iimSet("loop", i); ...
0
votes
2answers
25 views

Not process a variable in a string immediately in batch script

I'd like to know if it's possible to process a variable containing a variable not immediately but only when asked. For example this batch: @echo off setlocal EnableDelayedExpansion set VA=Two set ...
0
votes
0answers
53 views

Windows batch script: Manual power up vs Wake on Lan (WOL)

OK, I have a (win 7) desktop computer with WOL set up so I can turn it on remotely, it works fine. Next thing, on this computer I have a batch script, which runs at startup and starts various apps, ...
1
vote
1answer
30 views

Should a scheduled task remain in the “Running” state?

I'm new to using the task scheduler and I'm using it to run a batch file provided online when the computer boots. I r-clicked it and told it to run. It did and all is fine, but the Status of the task ...
2
votes
3answers
63 views

In windows, is there a way to count the amount of times a string appears in a file

I am currently trying to write a batch script and at this point, I need to find a string, "null", and determine how many times it is shown in the file. I'm downloading an API from a website ...
1
vote
1answer
54 views

Need help to replace one tag with another

Anyone can help me on EmEditor Macro? id="131" restype="x-p" phase-name="pretrans"><source>Good morning</source><seg-source><mrk mtype="seg" ...
0
votes
1answer
70 views

Deleting files older than X days from different directories using forfiles

I would like to create a batch file that deletes files (only files, not folders neither subfolders) from different directories (100+ different directories) older than 1 day and have this batch run ...
-2
votes
1answer
37 views

Loop Counter not working

@echo off setlocal enableextensions enabledelayedexpansion set /a eng_aud_count=0 set /a eng_sub_count=0 For /f "tokens=1-9 usebackq delims=.:^)^( skip=2" %%A in ("MY text File") do ( set trck=%%B ...
0
votes
0answers
48 views

Batch replace non-ASCII characters in filenames

I'm looking for a shell script that will recursively replace non-ASCI characters with underscore or just remove them. The issue is that a drive with files, created on Linux, has to be used on ...
0
votes
1answer
59 views

mklink in batch file keep returning insufisent permission

I made a code to execute an simbolic link between my Music folder and the music stored in my other hard drive @ECHO OFF SET /p bn=Band Name : md "%E:\Music\%bn%" SET /p dl=Album Name : mklink /d ...
0
votes
1answer
31 views

Batch script to only run command for 1 machine

I have a Windows GPO that runs a batch file startup script to disable NetBIOS. It normally looks like this: wmic nicconfig where (TcpipNetbiosOptions!=null and TcpipNetbiosOptions!=2) call ...
0
votes
2answers
76 views

Batch file rename with random alphanumeric

I am looking to rename a bunch of images (all with .jpg extention) with random alphanumeric names. Example would be 08kDRH1s.jpg or 0FwzUc3.jpg. Doing some searching I did find a few batch scripts ...
0
votes
2answers
60 views

Batch program to move shortcut file

I'm writing a short batch program to move a few shortcuts. The problem is that Windows returns, "Can not find the file specified". I imagine this is because either it's considered a system file ...
0
votes
1answer
25 views

need to copy folder with sub folder without answering prompt

I need to copy folder A to folder B and folder A is having subfolders. I have tried xcopy and copy both are stuck. C:\Users>xcopy sushantg\A\* sushantg\B /s /e /h /T Does sushantg\B specify a ...
0
votes
1answer
55 views

Using a .bat file to pull a string from a text file within a zip folder

So, please bear with me. This is only the second batch file I've ever written and my first post anywhere on StackExchange. I'm writing a batch file that tells a remote server to run HP Array ...
0
votes
0answers
49 views

Batch file with (Java invocation) wildcard expansion works on one Win 7 machine, fails on another

I'm using a Windows batch file to launch a Java program, using wildcard expansion to set a load of JAR files on the classpath similar to the below: java -cp "MyLibFolder\*" com.stupid.StupidProgram ...
1
vote
0answers
34 views

What Would I Call This? [closed]

When I'm working on a web development project or tutorial, I generally open the same applications, just with different files. I wrote a batch file for my current project, so I can open these with one ...
-1
votes
1answer
51 views

What comand do I enter into my batch file to do this?

I want my batch file to find a string in a file and return it to the next line in my batch file. How can I do this? I've googled over and over but can't get the specific answer I need with the ...
1
vote
1answer
47 views

When applications are slow to launch, how quickly is the process registered as running?

I'm looking at a problem with a java webstart kiosk app of ours. I occasinally get a support ticket saying that multiple instances of the app were found running at once on one PC. This causes problems ...
7
votes
2answers
727 views

Weird characters (´ā•—ā”) at the start of a batch file

I am working with batch files in Windows, using both Notepad, and Notepad++. When I run the batch files, which all start with @echo off, I see the first line (when running on two separate machines) ...
0
votes
2answers
100 views

How do I concatenate files using a list and batch?

I need the equivalent of the shell command xargs < list.txt cat -- > compiled.txt as a Windows batch file. There is a directory full of text files (about 50 to 500 files) that I need to ...
0
votes
1answer
43 views

Batch file to open 4 or 6 internet explorer screens and place them by dividing the desktop equally

I intend to write a script that can open 4-6 IE screens that can be automatically be placed on the desktop. So essentially all of them will get equal space on the desktop. I am aware of the command ...
1
vote
2answers
85 views

How do I get 64 bit %ProgramFiles% in batch file that is run from 32 bit application?

Problem is that in my case, a batch file run from 32 bit application have %ProgramFiles% expanding to "C:\Program Files (x86)".
1
vote
1answer
77 views

Batch copy gives errors, xcopy works fine

I am writing a general file backup program. It searches the drive for files matching a set of types and then writes them to a folder on the desktop. I wrote it using xcopy on Windows XP but upon ...
0
votes
1answer
850 views

Sending input to command line program from text/Batch file

I am a mechanical engineer with some hand on Programming in VC++. Our industry uses a DOS program & that requires 8 user inputs. We have to feed it manuaaly every time. Does we can automate this ...
2
votes
2answers
130 views

Using wildcards with the rmdir or rd command

Let's say there are some folder in the D: drive: D:\Air D:\Abonden D:\All D:\Whatever I want to delete all folders starting with "A" (including all subfolders and files). I tried this command: ...
8
votes
2answers
796 views

How do I make a batch file be able to run on other computers

When I create a batch file on my computer to execute start c:\Users\________\Whatever\..., it works on my machine. How can I get it to work on someone else's machine, since their username isn't my ...