Text file containing a sequence of commands or program invocations.

learn more… | top users | synonyms (1)

0
votes
0answers
121 views

Adobe command line to encrypt files

I have the task to find a command line to use a batch file to encrypt pdf files. There a pool of pdf files which should be converted in secure pdf files (all with the same password). I would like to ...
1
vote
1answer
2k views

How to execute Chown -r linux statement in windows

Can you please help me in executing chown -R linux statement in windows batch scripting. Thanks and Best Regards, Aman
2
votes
2answers
496 views

Need a Batch Toggle that will Launch/Kill Applications when run.

I have a great batch toggle that will show hidden files when run, then hide hidden files when run again. I am wondering if I can create a similar file that will kill a series of work applications ...
0
votes
0answers
23 views

file association batch file windows 8 [duplicate]

I'm trying to create a batch file that will associate .myroom file extension to myroom.exe program in windows 8 so whenever user clicks on a .myroom file, it will open it using myroom.exe software. ...
5
votes
2answers
25k views

Windows batch file if else usage

Sorry I am new to this stuff. I'd like to run in a certain sequence the same bat file with different parameters. I wrote a very simple batch file: @echo off REM Note: to see all command line usage ...
2
votes
1answer
592 views

How do I replace text inside a FOR command?

Inspired while writing my other question (which i now deleted) (sometimes talking to the duck does help) I think I found a solution to my problem but I don't know how to do it. I have the following ...
-5
votes
3answers
6k views

How to kill Java.exe from a Windows Batch File?

How do I write a batch file script which will kill the java.exe process? I intend to run it from the Windows Task Scheduler. Thanks.
-1
votes
1answer
1k views

Replace specific character with batch

I have a batch file that takes user input for a filename: set /p Name=Name: However, if the file name has multiple words, I want the batch file to replace the spaces with dashes. For example if ...
0
votes
1answer
1k views

use command prompt to delete an HKCU registry on a remote PC?

I want to delete an HCKU registry on a remote PC. On a local PC, the command is the following: reg delete "hkcu\printers\connections" /f However, how can I do this to a remote PC? The command help ...
1
vote
3answers
936 views

How to write a batch file to append each item (of a list of directories read from an external file) to PATH?

How can I translate the batch file from rem working batchA.bat PATH=%PATH%;C:\Program Files\gs\gs9.07\bin PATH=%PATH%;C:\Program Files (x86)\Adobe\Reader 11.0\Reader PATH=%PATH%;C:\Program Files ...
-1
votes
1answer
579 views

cmd.exe changing directories using a variable

Say my desktop is at "F:/Desktop". Why is it that in a batch file, this will work: @echo off setlocal enabledelayedexpansion set DesktopFolder=F:\Desktop cd / cd !DesktopFolder! But this won't: ...
2
votes
5answers
6k views

How do I exclude specific directories from a Windows search?

I want to search for a file on drive C:. I know for sure it does not exist in a specific directory(s) (say Program Files). So to shorten my search time, I want Windows to exclude searching in those ...
1
vote
0answers
190 views

From within a bash, bat, or powershell script is it possible to get the last IM message sent to you within Lync?

I use Outlook and Lync 2013. I have msys bash installed, and I have a script that runs a while(1) loop that sends Growl notifications whenever an IM is sent (it reads the ugly Lync log files). I'd ...
4
votes
2answers
2k views

Why does Robocopy ignore the /copy flags?

Robocopy Copy Flags? I just recently made an answer here http://stackoverflow.com/a/15211788/891976 where I suggested using robocopy and its /copy flags, but for some as of yet unknown reason, the ...
1
vote
1answer
3k views

Batch file for changing IP address not working in Windows 8

I have used batch files for years on XP and Windows 7 to change the IP settings on my Local Area Connection. For example: netsh interface ip set address name = "Local Area Connection" source = static ...
2
votes
0answers
47 views

Printing pages to different feeds (pdf) WINDOWS

We are currently sending out letters that print: Letter on letter-head (customized for recipient) Instructions on regular paper (customized for recipient) These letters are all sent automatically ...
0
votes
4answers
3k views

Minimize a program's windows after running it via .bat/.cmd

I'm trying to find a way to auto-minimize a program just after running it from a .bat file. I'm launching a SSH session via putty, and I'd like putty to auto-minimize. I use it just for the SSH ...
0
votes
1answer
137 views

Find the character in line?

I am trying to find the some character in file using find or findstr, for example file contents like: "/test/abctest/abci.txt = c:\abctest\tst\work\workt.txt;abc_test1" "/test/abctest/abci.txt = ...
2
votes
0answers
1k views

Batch file to move/compress/delete files

I am trying to write a batch script that will run automatically daily to do the following: Move files older than 2 days to from the main directory (Jason) to an archive directory. Zip files in the ...
0
votes
2answers
33 views

Management of directories and subrutines

From the current directory %CD%, I need to go inside a subfolder and execute a subrutineA, then go back to the %CD% directory and go to the next subfolder and execute the same subrutineA, this process ...
0
votes
2answers
415 views

Compare output of “DOS” command to something

(by DOS I mean windows cmd.exe - I don't want to enforce powershell or similar on the end user) I want to run a command line file that prints output to CON / the screen. I want to capture that ...
0
votes
2answers
86 views

Equivalents for .bat files for starting a jar file

Which are the .bat file alternatives for Linux, MacOSX and other operating systems for starting a jar file for example or another program (.exe, .app ...) with a click on this .bat / ... file? I just ...
0
votes
2answers
3k views

Bat script using WMIC causing issues

I am trying to write a script to install the correct display driver. Long story short on newer systems when you add a dedicated card the onboard is no longer disabled so when I run this command: FOR ...
0
votes
1answer
68 views

Start windows with no wallpaper, start bar and desktop icons

Im using a computer with windows 7 as a digital signage system, all i need to do is to start an app (exe), Id like to disable the start menu, the desktop icons and even replace the wallpaper with a ...
0
votes
3answers
2k views

Windows .bat fails when running from Scheduled tasks; runs fine when running from command line

I am trying to start a virtual machine via a batch file. The .bat file runs fine when I run it from the Windows command line. But when I run it from scheduled tasks, it exits with error code 1. I ...
4
votes
1answer
13k views

Launch a shortcut using batch file

Here's the problem. I have a shortcut on roughly 260 computers located in the same folder as below; "c:\documents and settings\all users\desktop\Remote agent 1234.lnk" The only thing that changes ...
3
votes
1answer
10k views

Batch script to reboot a Windows 7 PC

I want a system restart batch script to: On first execution, it should put this script in startup folder It should re-start the system. So that it keeps on restarting user's system. Can you ...
1
vote
1answer
686 views

How can I pass an argument to a batch in shortcut if calling a vbs script prior

I'm using windows and creating a shortcut to call the following. \\myserver\myfolder\inv.vbs \\myserver\myfolder\mybat.bat I have created the VBS script to not show the batch window (run hidden). ...
2
votes
2answers
840 views

Is it possible to have scripts that trigger whenever an IM is received in Microsoft Lync?

I've just upgraded to Lync 2013, and I'm considering using it instead of Pidgin+SIPE. One of Pidgin's many nice features is Growl integration... and I would miss that. There are no Growl plugins for ...
4
votes
4answers
9k views

How can I start a batch script before logging in?

I have set up my computer to boot at the same time everyday when I am not home. I need it to run a batch file without anyone touching it right when it boots. I have added a shortcut to the file in ...
0
votes
1answer
764 views

Batch file: Open cmd, run VS Command Prompt, execute Makecert

I need to do this in a batch file: Open cmd Run VS Command Prompt via cmd Execute this command "makecert -sv SignRoot.pvk -cy authority -r sha1 -a -n \"CN=Certificate\" -ss my -sr localmachine ...
1
vote
1answer
3k views

Using the taskkill command with a timer?

I using a custom .bat file that closes my chrome browser, but can't seem to find information on what syntax I need to add in order for the process to end after a given amount of time. Can anyone, at ...
5
votes
2answers
3k views

How to run a windows .bat script with wine from command line?

I'm trying to run a batch script from my mac terminal using wine (in order to provide arguments to a windows executable and piping output). so far I've tried executing wine runme.bat but ...
0
votes
1answer
536 views

Get current directory when running remote batch file

Hello I have the following batch file saved to a location called C:\.alias. I added this directory to the path so that I can run all my custom scripts. I have tried creating a script to open a file in ...
0
votes
1answer
141 views

writing a file list to a text file but don't want the directory name

I'm trying to write a quick batch program that will either copy the names of the files in a folder or that folder and the sub folders. The issue I'm having is: I don't want the directory names. Here ...
0
votes
1answer
954 views

Delete a character from an argument passed to a batch file

Suppose in a batch file, say receive.bat, is called with some arguments. Now receive.bat executes and it needs to process these arguments. Sometimes (but not always), an argument will end with a ...
2
votes
1answer
857 views

How can I add a value to the registry via command line without a .REG file?

I have a need to add my external IP address to the Windows registry on a scheduled basis, and I want to do this with a bat/cmd file to automate the process. I was able to use the advice from this ...
1
vote
3answers
3k views

How to get the Visual Studio installation path in a batch file

Normally, the path is something like C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\. From Visual Studio, one can use $(VCInstallDir)$ to get this path. Q: But in a batch file, how to get ...
2
votes
1answer
18k views

Pass a path with space to a batch file as a parameter

In first.bat, I use var5=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\ CALL scripts\vc64.bat %var5% And in scripts\vc64.bat, I use SET var6=%1vcvarsx86_amd64.bat CALL ...
0
votes
2answers
218 views

Can't make batch file to start a second .bat

I have this code @echo off cd c:\windows\System32 for /f "skip=3 tokens=1" %%i in ('TASKLIST /FI "USERNAME eq %userdomain%\%username%" /FI "STATUS eq running"') do ( if not "%%i"=="svchost.exe" ( ...
0
votes
1answer
11k views

Batch file to copy files from desktop location to another location?

I want to Copy/Move files in Windows XP from Desktop(a Folder) to My Document(another Folder), which was created by same Batch File on Current Date in Format DD/MM/YYYY. This is working fine when ...
1
vote
1answer
1k views

Windows XP/7 copy command line involving junction

I have a batch script which needs to work with Windows XP (for the time being) and Windows 7. The script also copies a link to the Windows Desktop. copy /Y path\to\the\link.lnk ...
1
vote
1answer
3k views

Batch rename files to numbers with leading zeros [duplicate]

Possible Duplicate: How do I rename a bunch of files in the Command Prompt? I'm coming back to Windows after several years in Linux (I'm a trucker, and the company I just leased my truck ...
0
votes
1answer
62 views

Fix location to run this script?

I have a batch file from Karan. How to fix location to run this batch my file location is C:\proview\upload\EJ_daily_Temp. path=c:\program files\7-zip;%path% for /f "tokens=1,2 delims=_" %%i in ...
0
votes
2answers
4k views

Using Call SET to Designate a Variable in a Dos Batch “For” Loop

Trying to use the Call SET to set a variable in a windows batch file loop. Not working but here is the input / output file. trying to assign Var C to equal 1. Batch file: @ECHO OFF for /f ...
5
votes
2answers
8k views

how can I make my .bat file continue after an error

I have a .bat file in windows that does three things cmd1 arg1 arg2 cmd2 arg3 cmd3 arg4 arg5 arg6 Sometimes cmd1 can fail and that's fine, I would like to carry on and execute cmd2 and cmd3. But ...
0
votes
1answer
302 views

run interactive program from Window CMD script

I have a CMD script to run on Windows. It does DEL, but the shell would ask "Are you sure?" How do I make the script answer 'YES', or better yet, just does a silent DEL ? Thanks
1
vote
1answer
2k views

How to make a batch file to search all drives?

How can I get this batch file to read all physical and mapped drives? It works fine with C: but will not read any other drive. @echo off set filePath= for /R c:\ /d %%a in (*) do if exist ...
0
votes
1answer
6k views

How to use IF ELSE and IF NOT conditions in the same batch file?

Using a Batch For backing up a directory (Chrome). I'm using the native Windows Schedule Task Manager to ping, run the file (working great). However, if I go to bed (forgetting to shut down Chrome), ...
1
vote
2answers
258 views

CD command not returning correct results under FOR loop

The CD command returns the current directory, and the %CD% variable returns the same result in an environment variable: c:\Temp\test\test1>cd c:\Temp\test\test1 c:\Temp\test\test1>@echo %cd% ...