Text file containing a sequence of commands or program invocations.

learn more… | top users | synonyms (1)

0
votes
0answers
20 views

“Filename or extension too long” for move, but it isn't

I'd appreciate some insight as this is driving me nuts. I have a folder on a network share: \\host.example.com\Share\Path\Container1\Folder I am trying to move that folder to a new location on the ...
2
votes
1answer
26 views

How to find folders with certain files and delete the folder?

I'm looking for a way to find and remove every folder which contains files with extension .drt in it. It's a networkshare and structure is shown below, in this case I want to delete subfolder 1 and 3 ...
1
vote
2answers
14 views

Delay batch files in between commands

How do I delay batch files in between commands, with say a once second delay, or even less? I've tried using the ping null command, but it never seems too work for me? ping 127.0.0.1 -n 1 > null ...
0
votes
1answer
29 views

How to delete file by file with batch

I'm wondering how I can make my batch file delete a file one by one in a folder of my choice, and echo each fie deleted afterwards.
0
votes
0answers
37 views

Beep PC Motherboard Speaker in Windows 10

I need to beep an internal hardware PC Speaker on Motherboard from Cmd Prompt or a batch in Win 10 64-bit. The most useful thread here on the subject offers some apps and drivers for Win 7 32/64-bit, ...
1
vote
1answer
34 views

Batch cmd closes with ascii art?

I'm trying to make a ascii skull in batch, yet the cmd doesn't show my art OR text when opened start cmd.exe @echo off color a cls echo ^_________-----_____^ echo ^____------ ...
1
vote
1answer
24 views

Connect to Untrusted VPN Server using Cisco AnyConnect via command line in Windows

I have 2 VPN and sometimes I should switch them very often. I decided to create .bat file which could connect to desired VPN with credentials set in this file. So I create .bat file with following ...
1
vote
1answer
51 views

How to type commands in PuTTY by creating batch file?

I have created a .bat file which automatically takes the SSH server (Jump Server) access. Now, I have couple of commands which I would like to hit in that window. For an ex. (To take root access) ...
0
votes
1answer
30 views

How to stop .bat files from running in background?

I'm facing a strange problem after change the Screen configuration on my PC, the story is that before I identify my graphics card I used to use the CMD in full screen (windows 7), and whenever I run a ...
0
votes
1answer
53 views

How to create a Windows Batch Script to do this?

I am running Windows-7. I want to create a Windows Batch file which works like this: Run an exe with specified arguments. Wait for the complete execution of this exe. (This EXE is essentially ...
1
vote
1answer
17 views

Use a .Properties File to pass values to a Batch File

What we’d like to do is to eliminate the need for embedding the User_ID, User Password, Host Server Name, and Specific Database names into our batch file when automating a backup from our MySQL Server....
0
votes
0answers
42 views

Unpacking and then repacking a war file using batch command is increasing the size of the war file

I have a war file named CheckIn.war. I use the following batch command to unpack and then pack the war file. I also use a java code to change a value in an xml file after unpacking. jar -xvf CheckIn....
0
votes
0answers
12 views

Is there a way to have a batch script restore the Quick Launch bar in Windows 7?

Every so often, my Quick Launch toolbar disappears. It might be when my laptop completely runs out of battery (e.g. while asleep) and even the CMOS time is zeroed. Or it might be certain Windows ...
3
votes
1answer
31 views

Need a bat file to delete a folder with a unique name

So, I'm working on a bat file to delete a file, then find and delete a folder. It deletes the file just fine, but I'm running into issues with the rest. The folder I'm trying to delete has a ...
-4
votes
0answers
20 views

how long does it take to setup hot folders and is powershell the best to use?

I am hoping any experts out there in the field of powershell can help me. I have 0 experience in scripting but i need scripts to be made to execute as follows : I need folders to be made as ...
10
votes
3answers
256 views

Two Programs having their StdIn and StdOut tied

Suppose I have two programs called ProgramA and ProgramB. I want to run them both simultaneously in the Windows cmd interpreter. But I want the StdOut of ProgramA hooked to the StdIn of ProgramB and ...
3
votes
1answer
24 views

VSSADMIN Behavior when you press 'y' to “delete shadow copies”

I have a bat file to do some cleanup on machines with minimal disk space. This bat file deletes windows restore points that eat up a lot of space via the command 'VSSADMIN List ShadowStorage'. It also ...
5
votes
2answers
82 views

How do I create a txt file for each word in a list

Example: I have a .txt file... (C:\Gardening\WordFile.txt)... with the following words... Aquaculture Aquaponics Hydroponics Aeroponics I need a .TXT file created in a specified directory... (IE: ...
0
votes
1answer
26 views

Batch get file contents

I have a batch file that is suppose to search for a file with a specific extension in the directory, and then get that file's extensions. It succesfully finds the file but for some reason it's not ...
-1
votes
0answers
14 views

Error scheduling job in Windows 2012 that ftp's files

I have a job that runs fine when I run it manually. It basically creates text files and ftp's them to the remote server. But when I schedule the job in Win Task Scheduler it creates the text file but ...
0
votes
0answers
16 views

ffmpeg piping to aucdtect in a batch file

I am trying to pipe ffmpeg output to auCDtect in a batch file like this: ffmpeg -i %1 -acodec pcm_s16le -f wav - ^| auCDtect.exe -- For some reason aucdtect just freeze at Data analysis: [...
1
vote
2answers
32 views

Batch extract thumbnails with ffmpeg

I need to batch extract thumbnail pic from hundreds of .mpg files using the following bat code, which works like a charm, but the only drawback is that the output png are with file name like "filename....
2
votes
2answers
24 views

Block-unblock or create-uncreate reg keys prevent rewriting or accidental or deliberate deletion, using the command line

I have this method to block registry keys and prevent accidental or deliberate deletion or rewriting, either by a user or by malware example of keys: "HKEY_CLASSES_ROOT\Applications\cmd.exe" "...
0
votes
0answers
9 views

mysql does not display string variables only numerical

Just experimenting with mysql and batch file (call me nostalgic :-) ) echo SELECT some_field FROM some_table WHERE some_field like '%needle%' \G > command.sql mysql -s -q -h %svr% --user=%user% --...
1
vote
1answer
19 views

CMD will not make variables equal

I am trying to make a batch script that will take the names of all sub-folders in a directory as variables for use elsewhere. The section of code that is confusing me is: for /d %%D in (C:\Users\...
0
votes
2answers
16 views

How to remove last 4 character before saving data to txt file

I have a batch file that saves image names from folder to txt file, but before i'm saving them i want to remove .png How can i do it? @echo SET path = "C:\Documents\Img" dir /b %path % > myImg....
1
vote
1answer
49 views

run bat with a copy of cmd.exe in another path

I have a test.bat and a copy of cmd.exe (rename cmdnew.exe), both in a same folder. Question: How can i run test.bat with a specific "cmdnew.exe" (not with cmd.exe)? (how can i register the new path ...
-2
votes
1answer
39 views

Run ps1 with admin privileges and unrestricted policies from a batch file?

I have a test.bat to run a test.ps1 with admin privileges and unrestricted policies, and both are in the same folder (local PC), but the bat does't run ps1. Whats wrong? PowerShell -NoProfile -...
0
votes
0answers
33 views

Batch command to combine multiple excel files into an excel file with multiple sheets

I have many excel files. i want to combine them into a single file with multiple excel sheets. Is there a batch command to combine multiple excel files into an excel file with multiple sheets?
-1
votes
1answer
29 views

CD /d <x:\folder> failing inside a .cmd script

I'm stunned with a glitch I've come across while creating some network traffic capture scripts (.cmd) Windows NT6x, Windows 7 and up (tested in Windows 7/8/10). A plain simple: CD /d x:\net\tools ...
0
votes
0answers
15 views

Copy 2 hours old file to empty directory

Been searching the web for a way to create a batch script to copy files from one directory to another but I could only find ROBOCOPY to do the ALMOST what I want. ROBOCOPY has a MAXAGE command but you ...
2
votes
1answer
17 views

Pass errorlevel from a child batch to parent

Parent .bat @echo off SETLOCAL set errorlevel=2 start /wait child.bat echo %errorlevel% Child .bat set errorlevel=1 exit %errorlevel% Output: 2 Expected Output: 1 The answer provided ...
1
vote
2answers
33 views

%HOMEDRIVE% is not giving the expected output

When i run the below batch script @echo off cd /d D:\Home\Folder echo %HOMEDRIVE% pause I get H: as the output. But ideally it should be D:. Why is it so?
0
votes
0answers
25 views

Split Dos/windows text file into smaller multiple Unix text files?

First of all i using WINDOWS OS and not Linux,all i want is to Split a big file from Dos/windows text file into smaller multiple Unix text files?All tools i tried,they spliting in to dos/windows ...
0
votes
1answer
30 views

Batch file automate

I have a batch file that has options, but i wish to automate those options but i do not know which is which. after the batch is run it then prompts for a password, which i would also like to automate ...
2
votes
0answers
27 views

Bat “move” fails seemingly RANDOM with access denied

My bat shall move a couple of folders, but there is one specific folder that will sometimes get moved, sometimes not for no particular reason. move "%~dp0\source" "%ALLUSERSPROFILE%\target" >NUL ...
0
votes
1answer
46 views

Find duplicates string in a text file and print the duplicated string alone in another text file

I am trying to find duplicates in my huge text file and trying to print it in another text file. But I am unable to print it in another. Here's what I have got so far: for dup in $(cut -d " " -f1 ...
1
vote
1answer
42 views

How do you open an HTML file with chrome, from a batch script?

How can I open an HTML file in chrome, using a batch file? I have tried this: start chrome index.html The first part is correct, since it will open chrome, but it will just type out index.html/ ...
2
votes
1answer
56 views

Searching through a txt file and printing next word of a string

I have a batch script which will print the entire line of search string into a text file. for %%i in (configure.txt) do ( FINDSTR /C:"Widget Name=" %%i >> output.txt ) Here is how my ...
1
vote
0answers
17 views

Batch file to delete sub folder if exist and else batch file should create new folders?

i need a Batch file to delete Sub folder in a folder if exist else batch file should create new sub folders in Mainfolder?
-3
votes
2answers
53 views

Batch file to Check and Compare size of .log file in a folder [closed]

I have to find the files from a folder whose size is greater than 10 MB. Please guide how can i complete this task.
0
votes
2answers
27 views

Replacing certain parts of text file with variables in batch

I'm trying to replace stat.score and stat.level with corresponding variables, but it just prints stat.score=000099 to every line. Here's the code: @echo off mode con cols=100 lines=40 setlocal ...
-1
votes
1answer
45 views

Batch to move files from root folder into sub-folders

I have a root folder: C:\Users\username\Desktop\New folder which contains .mp3 files that are named like this: 20162406_3346_234958_97270791720411 20162305_3315_163017_97620734220699 I tried ...
-1
votes
1answer
36 views

Bulk rename files based on the first line of their contents?

I have a folder full of .java files, which I wish to rename. I want to rename the files with the first line of the contents of that file, with suffixes if the first line is same for two or more files?...
0
votes
0answers
23 views

ping results exported to .csv to multiple rows and columns

I have a script that I run to ping multiple Ip addresses. It works just fine with everything that I have in it the way I want it. The problem is the export. I need "Router" to Start in Column "A" ...
1
vote
1answer
15 views

XCOPY /exclude reference a ext file that is not in the working directory

I have tried to reference the directory of the text file after /exclusions. What is wrong with my syntax? xcopy "J:\Common\NY SERTIFIKATBANK\18 Buoyancy Reports\Nav Lights\534515" "534515" /I /...
0
votes
1answer
61 views

Windows ftp command: How to count number of files in remote directory?

When I use the Windows ftp command at the command window which I think is the DOS ftp command, is there a way to count the number of files in the remote directory? That way I can check that I ftp'ed ...
0
votes
1answer
44 views

How do you make an bat file that talks to a server?

Basically I have employees and I don't want them to know my powershell commands. So I would like to make my .BAT files into EXE files and everytime it is ran it will ask for a user name and password ...
1
vote
1answer
49 views

& was unexpected at this time

I have a batch file that is supposed to set some variables at the beginning. for /f %%A in ('wmic os get osarchitecture ^| find /i "bit"') do set "OSARCH=%%A" for /f "skip=1 tokens=4" %%B in ('wmic ...
0
votes
2answers
48 views

How do I make a batch script that toggles my internal Wi-Fi adapter?

It's been a few years since I used a computer that used Windows. I've been using Linux for a while. However, I do remember a few things about writing a batch script. (REM for comments, ECHO to print ...