Text file containing a sequence of commands or program invocations that does not need user intervention.

learn more… | top users | synonyms (1)

0
votes
1answer
432 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 ...
1
vote
2answers
465 views

how to access variables that are set in a different windows batch file?

i have a windows batch file - called fileA.bat, which contains a variable set in it. Sample code of fileA.bat: set fileA_username=michael now i have another batch file, called fileB.bat, which ...
0
votes
1answer
81 views

How to emulate bash select command in batch DOS?

Hi i have a variable containig a list of folders separated by a space, i want to present these elements each precedeed by a number, the user choses a folder by entreing the number associated with it, ...
1
vote
1answer
401 views

Problems elevating permissions while running a batch (CMD) file

I’ve put together a batch (CMD) file that we use to check various things on select servers. What is posted below is almost everything (minus sensitive info). If launched with the proper command ...
1
vote
3answers
809 views

CMD keep running program

This isn't very googleable, and other than writing prog.exe -params several times in a batch file (which would obviously only work as many times as I wrote it) I can't think how to repeatedly do this. ...
2
votes
1answer
143 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
86 views

%RANDOM% environment variable is giving a single number [duplicate]

I’m having trouble with the %RANDOM% environment variable in the following command: FOR /l %%A in (0,1,30) do set /a results=1600 + %RANDOM% %% (1900 - 1600 + 1) && echo %%A--!results! I ...
0
votes
2answers
310 views

MS Dos Batch rename options

I have some files like: f0110_01_online.png f0122_01_01_online.png f0122_0201_online.png There is common text '_online' in every filename. I just want to remove '_online' from every filenaeme ...
0
votes
1answer
28 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
61 views

How can I automatically delete the MP4 version of a file if an MKV version exists?

My upstream host has changed the way they send video files and I now have dozens of folders that contain both an MP4 and an MKV version of the same file. I want to keep the higher quality MKV file and ...
0
votes
1answer
415 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 ...
0
votes
0answers
197 views

whats a good way to format event log (wevtutil) results?

wevtutil qe Application /rd:true /c:10 /f:text this returns the following (partial): Event[7]: Log Name: Application Source: SceCli Date: 2013-11-14T04:13:03.000 Event ID: 1202 Task: N/A ...
2
votes
1answer
263 views

Detecting computer name

How can I detect if I am on a certain host computer in a batch script? Ex if I run the command hostname it gives me the current computers hostname. Is there a way that I can save that to a variable or ...
1
vote
1answer
3k views

Internet Explorer 8 “Run with different credentials” shortcut - batch script option?

Internet Explorer 8, combined with Windows 7, offer the possibility to open IE by specifying which user account will be used for security. This can be done by shift right clicking the IE shortcut and ...
1
vote
0answers
204 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 ...
1
vote
2answers
2k views

Delete all files older than 365 days, but exclude certain folders

Edit: After @Mbu answer I realized that my first approach with leading numbers in folders as criteria to exclude isn't the right way. I decided to use a fixed list of folders to exclude. I want to ...
2
votes
2answers
81 views

Trying to hide this text that shows up after “pause” in cmd

This text "Press any key to continue", I don't want this to show up, is there a way I could hide this part of the text but I also want the previous to stay, thus the pause command.
3
votes
3answers
3k views

What does the percent sign (% and %%) in a batch file argument mean?

I think I'm missing something because I can't seem to find what this means. Example: for /D %%A in (*) do "\7za.exe" u -t7z -m9=LZMA2 "%%A.7z" "%%A" That line was supposed to use a command line ...
0
votes
0answers
72 views

How can I get the Windows command line to ignore the “set” reserved word?

I'm running an IIS command on a remote server via PSEXEC. the command I'm running has the "set" keyword, which is a command-line reserved keyword. My command looks like this and throws an error. ...
0
votes
2answers
88 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
2answers
179 views

Batch file to create many files with special characters

Essential info: I have a file "DB_OUTPUT.TXT" with 304 lines that I need to turn into 304 files (one per line). Each line contains many special characters and may be up to tens of thousands of ...
0
votes
2answers
2k views

Batch IF .exe is not running

I am trying to create a batch that IF program.exe is not running in process, it will run code below. In vb.net this is easy, but I do not want to create a program. I am guessing a VBS script would ...
0
votes
2answers
486 views

how to use sleep command for parallel running of batch files

Sorry for this painful dumb question . I have 2 batch files where i have some commands to execute in batchfile1 and sleep for some time and then execute somecommands in batchfile2 and again batchfile2 ...
1
vote
2answers
746 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
128 views

Is Clonezilla a good option for a daily batch-file-based backup of a Windows XP PC?

Having just been through the process of rebuilding a Windows XP desktop machine when the disk died, I'm anxious to make it a lot less painful. I didn't lose any data, but reinstalling everything took ...
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 ...
0
votes
2answers
68 views

Batch-Script for copying and overwritting existing files

So I've got a file called modified.txt, however the same file is in a bazillion folders and subfolders. I want to copy the modified.txt to all these bazillion folders and subfolders and overwritte ...
0
votes
2answers
156 views

How put path changing .bat file inside %PATH%?

I have a problem described here (you can read it for better understanding). I need to write .bat file that change path. For example: While sending a command in cmd: cd ~ I want to go to %HOMEPATH%. ...
0
votes
0answers
10 views

Batchfile Cypher to Word

I am looking for that movie effect in a batch file, where there are numbers and letters flashing, and they eventually land on the right letter and form a word. Would anyone know how to do that?
0
votes
1answer
308 views

TotalCommander: a button to run a batch script?

could anyone give me a hint how to configure a TotalCommader UI panel button to run a batch file residing at some location, say C:\scripts\batch.bat? I literally need contents of button config ...
0
votes
0answers
119 views

Batch file console window close?

I have a batch file which executes a PLink command and accepts ssl certificate on Linux server. When I run this code, console window appears and accepts the ssl but is unable to close console window ...
2
votes
2answers
241 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
444 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)
0
votes
2answers
858 views

Create .bat file to deactivate device [duplicate]

I'm not familiar with creating .bat files, but I want to create a file to deactivate/disable a network device This is in win7. I have googled some similar problems, but nothing to solve this. pls ...
0
votes
2answers
296 views

Find all .mp3 and move to specified directory using batch

How would I change this to find .mp3 and move to specified directory? @echo off set extlist=mkv mp4 mp3 set rootfolder="C:\Users\Fred\Downloads\uTorrent\Downloads\Complete" pushd %rootfolder% if not ...
1
vote
1answer
414 views

For Windows systems, will “.bat” or “.cmd” extension make any difference for my script?

Assuming that my shell script is entirely based on DOS commands(dir, cd, etc and not VBS or PowerShell commands), using .cmd or .bat extension for it's name will change something? I mean, it will be ...
-1
votes
1answer
143 views

Batch or VBscirpt to copy only folder structure(Not Files) from one server to another server by giving folder structure as an separate input file

Example: Source: Server 1: C:\Folder1\Test2 C:\Folder2\Test3 C:\Folder3\Test1 Destination: Server 2: (Same structure above should be copied here with permissions) Note: In script, have to call the ...
1
vote
1answer
109 views

BATCH SET unable to use divide operator

I am unable to divide using the divide operator provided in the SET command. SET /A 216/18 SET /A div=216/18 ECHO %div% Though this should work and it does in the command prompt window ...
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 ...
2
votes
1answer
101 views

Which program should a batch script with extension .bat be associated with in XP sp2?

For some reason or other my .bat files are associated with notepad and will therefore not run. Looking for answers, I have only found solutions for systems other that XP. Assistance would be greatly ...
1
vote
3answers
4k views

Start programs via command-line, but only if not already running

I came up with the batch file below, and it is working great. However, I would like to know if there is a way to code it so that if a program is already running, it would skip it and launch the next ...
-1
votes
2answers
1k views

How can I find and delete all video files from all drives using batch file

I want to search and delete *.mp4 *.mpeg, *.mkv, *.flv, *.avi (all video files) from all drives (C,D,E,F) or anywhere in my computer in any directory or subdirectory, using BATCH File. My operatin ...
1
vote
1answer
757 views

change permission using .bat file in window server 2008 r2

I'm doing the permissions in Windows Server 2008 R2. I'm learning to use a batch file to do this quickly, but it's not doing the right thing that I want. This is the code of the simple .bat file ...
13
votes
6answers
2k views

How can I open a console application with a given window size?

The application I want to start is MongoDB. If I would start it normally, it looks like this: I don't like the amount of line breaks and I have a lot of screen space, so I would like to utilize ...
1
vote
0answers
76 views

Programmatically uncheck Show Unzipped Files option for Winzip

I am in need of setting the “Show Unzipped Files” under Home > Unzip options to unchecked for the Winzip 16.5 . The default installation of winzip MSI set the “Show Unzipped Files” options as checked ...
0
votes
1answer
188 views

Exit windows batch script gracefully?

My PATH is too full, so I need to put things in batch scripts like "cl.bat": @echo off %comspec% /k ""%ProgramFiles%\MICROS~1.0\Common7\Tools\VsDevCmd.bat"" call cl %* Unfortunately this has a ...
-1
votes
2answers
834 views

How to reduce the font size while print notepad file from DOS using BAT file

I am using DOS BAT file for print text file(bill).The problem is font size is too large so, its not fit in the paper size.The BAT Code is copy bill.txt \\127.0.0.1\bill exit please explain how to ...
2
votes
2answers
454 views

Cannot delete hidden file on network drive using DOS / batch script

I am trying to delete a file from a mapped network drive, I: In my batch script, I have: del /f I:\bin\.hiddenfile When I run the script, I go to the directory I:\bin and see that .hiddenfile is ...
0
votes
1answer
375 views

How do I run a batch file that automatically runs the .exe file when it gets stopped?

can someone help me out with this? How do I run a batch file that automatically runs the .exe file when it gets stopped?