How can a batch file run a program and set the position and size of the window?

Here is an alternate way with nircmd util from http://www.nirsoft.net/utils/nircmd.html Examples: nircmd win move ititle “cmd.exe” 5 5 10 10 nircmd win setsize ititle “cmd.exe” 30 30 100 200 nircmd cmdwait 1000 win setsize ititle “cmd.exe” 30 30 1000 600 Here are the contents of SetEnv.cmd: Explorer /n,c:\develop\jboss-4.2.3.GA\server\default\deploy nircmd wait 1000 win setsize ititle “something” … Read more

find path of current folder – cmd

2015-03-30: Edited – Missing information has been added To retrieve the current directory you can use the dynamic %cd% variable that holds the current active directory set “curpath=%cd%” This generates a value with a ending backslash for the root directory, and without a backslash for the rest of directories. You can force and ending backslash … Read more

Sublime Text 2 – Open CMD prompt at current or project directory (Windows)

Click the menu preference > Browser Packages in Sublime Text 2. Create a folder Cmd in the directory opened in step 1. Create a python file named cmd.py with the following code in the Cmd folder created in step 2. import os, sublime_plugin class CmdCommand(sublime_plugin.TextCommand): def run(self, edit): file_name=self.view.file_name() path=file_name.split(“\\”) current_driver=path[0] path.pop() current_directory=”\\”.join(path) command= “cd … Read more

Open a URL without using a browser from a batch file

If all you want is to request the URL and if it needs to be done from batch file, without anything outside of the OS, this can help you: @if (@This==@IsBatch) @then @echo off rem **** batch zone ********************************************************* setlocal enableextensions disabledelayedexpansion rem The batch file will delegate all the work to the script engine … Read more

Rename multiple files in cmd

Make sure that there are more ? than there are characters in the longest name: ren *.txt “???????????????????????????? 1.1.txt” See How does the Windows RENAME command interpret wildcards? for more info. New Solution – 2014/12/01 For those who like regular expressions, there is JREN.BAT – a hybrid JScript/batch command line utility that will run on … Read more

Rename or remove prefix for multiple files to each ones’ number in Windows

A much simpler solution is provided in https://superuser.com/a/871799/497147 I copied it here for easier access. Forget about complicated scripts for this. rename is a very old and never properly completed command. If you do not use it properly, the result might surprise you. For example to remove a prefix abcd from abcd1.txt, abcd2.txt, abcd3.txt etc. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)