Skip to main content

Questions tagged [batch]

Batch processing is the execution of a set of commands or software programs without user intervention. A batch file is a text file containing a sequence of such commands or programs invocations. Please use the tag [batch-file] for that.

65 votes
14 answers
126k views

Batch convert encoding in files

How can I batch-convert files in a directory for their encoding (e.g. ANSI → UTF-8) with a command or tool? For single files, an editor helps, but how can I do the mass files job?
desolat's user avatar
  • 1,102
29 votes
6 answers
79k views

Windows: How to add batch-script action to Right Click menu

I have a few programs that creates temp files or backup files or similar files that are not important. For example, GVim for Windows by default creates a backup file in filename.txt~. I sometimes ...
ervingsb's user avatar
  • 372
89 votes
6 answers
169k views

Variables in batch file not being set when inside IF?

I have two examples of very simple batch files: Assigning a value to a variable: @echo off set FOO=1 echo FOO: %FOO% pause echo on Which, as expected, results in: FOO: 1 Press any key to continue ...
Brown's user avatar
  • 1,652
57 votes
6 answers
410k views

How can I convert a Windows batch script to a .exe?

I have a fairly simple batch script that I would like to execute using a macro on my fancy gaming keyboard. However, SteelSeries Engine only supports opening a .exe file with the macro buttons. Is ...
Chase Sandmann's user avatar
20 votes
7 answers
141k views

Enable/disable wireless interface in a bat file

Is there a way to enable/disable a wireless network interface via the command line (so I can put it in a bat file)? When I'm in the office I use a wired connection, but Windows still occasionally ...
Herms's user avatar
  • 9,742
32 votes
3 answers
43k views

Run a batch/cmd upon screensaver

Is there a way to run a .bat or .cmd when the screensaver starts? I've noticed some .exe can run if you rename them to .scr but is that it?
laggingreflex's user avatar
223 votes
17 answers
183k views

How to supress "Terminate batch job (Y/N)" confirmation?

In cmd, when we press Ctrl+C we get the target application terminated but if the target application is called from a batch file, we get this "Terminate batch job (Y/N)" confirmation. I can never ...
Srikanth's user avatar
  • 4,999
56 votes
9 answers
160k views

Using Gimp to batch convert images to another format in Windows

As implied by the title, does anybody know how to use the gimp-console-[version].exe program to batch convert images between formats (with default settings) in Windows ?
Alex Marshall's user avatar
52 votes
3 answers
59k views

Programatically associate file extensions with application on Windows

I've just recently reinstalled Windows and in setting up my environment I've noticed that all my associations for the various programming languages I edit in Notepad++ have gone (naturally). I am ...
deed02392's user avatar
  • 3,072
36 votes
11 answers
46k views

How do I batch change the date taken information in EXIF data?

I use F-Spot to manage my images. For one set of images, the dates somehow got messed up and they all are marked as September 1st 2007. I'd like to change the date taken information to a different ...
Eugene M's user avatar
  • 913
24 votes
9 answers
108k views

How to make 7-zip do a whole bunch of folders

I got a bunch of pictures that I had to crop into 800x600 pixels. That was easily done, but now I have to upload them so the family can see them all. Thing is, this is 500MB in pictures. I decided to ...
KdgDev's user avatar
  • 5,548
9 votes
5 answers
34k views

Add folder name to beginning of filename

I have a directory structure as below: Folder > SubFolder1 > FileName1.abc > Filename2.abc > ............. > SubFolder2 > FileName11.abc > Filename12.abc ...
shekhar's user avatar
  • 155
3 votes
2 answers
31k views

using FORFILES in batch to delete tmp and bak files older than a week

I am having issues making this syntax work correctly. What I would like to do is remove all tmp and bak files from the specified directory and all subdirectories if the modified date is older than 7 ...
TWood's user avatar
  • 317
141 votes
13 answers
485k views

Can you zip a file from the command prompt using ONLY Windows' built-in capability to zip files?

I have a batch file that outputs a text file. I thought it would be nice if I could zip it up too. This will be used in an uncontrolled environment, so I can't make assumptions about the presence of ...
Aaron Bush's user avatar
  • 1,553
89 votes
11 answers
239k views

Get current folder name by a DOS command?

Is it possible to get the current folder name (not current directory path) by using a DOS command? If so, how? The closest I got was this but it doesn't do it: for /f "delims=\" %%a in ("%CD%") do ...
djangofan's user avatar
  • 2,899

15 30 50 per page
1
2 3 4 5
25