batch

all shell-script commands in batch-commands portable?

hi, I'm no linux user (yes, I'm sorry!) and a friend of mine asked me to port his shell script for linux into a batch for windows, because he wants to do the same task there to. I haven't worked with shell-scrips before and my batch skills are, hmmm, almost not existing, but I would like to try that. So I would like to ask if there ar...

Batch How do i execute a command on every .m4p file in all Sub dir

Basically i want to run this in ever Sub folder for %%i in (*.m4a) do faad "%%i" for %%i in (*.wav) do oggenc "%%i" for %%i in (*.m4a) do del "%%i" for %%i in (*.wav) do del "%%i" it works great but i have to manually change dir and re run eg. cd res cd music for %%i in (*.m4a) do faad "%%i" for %%i in (*.wav) do oggenc "%%i" fo...

Moving and renaming in batch

How to write a Batch program that can move files with .txt from a folder (including files in sub-folder) in to a different folder and rename it in the form folderName_subfolderName_Filename.extension ...

Taskkill an untitled process?

So I'm using the taskkill.exe which comes with Vista and I want it to do something especially complicated.. There are multiple instances of java.exe running, and I want it to find the one that is untitled.. so this is my command: taskkill /IM java.exe /FI "WINDOWTITLE eq " I also tried: taskkill /IM java.exe /FI "WINDOWTITLE ne Auto...

Determine dynamic file name in DOS batch script?

We have a single file in a fixed directory that will have the name database-x.x.x.zip where x.x.x is a version number that can change. We want to create a batch script that will unzip this file - we can use 7zip to unzip the file from a batch script but we need to be able to pass the file name to 7zip - how can we determine the file nam...

Is there something to double output a % character?

Is there something in a BATCH file that would double a % character? The test.txt INPUT file contains the following " Hello World The filename is : filename with spaces and 50% percentages signs.txt The %~nf removes extenstions Is there something to double a % charactor? As I would like 50% to be outputed as 50%% because the output o...

Batch script to read file contents into an array

H guys, using a windows batch script I am looking to pass a run a command x number of times with a different argument each time, the arguments being parsed in from a file. For example have a textfile saying arg1 arg 2 arg3, the batch script would parse this and run program.exe -arg1 program.exe -arg2 program.exe -arg3 I am thinking r...

SqlCeCommand and Batch Inserting

Dear Friends I would like to know that is it possible to Insert a batch of SqlCeCommand(s) ? note : All SqlCeCommand(s) have got a property. ( not solid sql command ) thank you; ...

How to copy a file from one windows machine to other windows machine?

How to copy a file from one Windows machine to other Windows machine? so that i can write a batch script can run that from Hudson machine. My requirement is , I like to deploy war in tomcat server located remotely in another windows machine through Hudson (war will be generated in this machine) which is located in another windows machin...

Why does the batch file crash?

I'm designing a chat for my school LAN network, it types your messages into a .dll file so as to disguise the chat log. The problem is that all of a sudden, whenever I started typing messages which have a space in them, the batch file crashes. For example if I enter the message as "h h" the batch will crash with the error: h==exit w...

batch file to read specific letters from a text file?

Hi, I have a txt file called named.txt Is there a way to create a batch file to read every letters 2 through 7 letters from every line from name.txt and ignore the rest and output it onto a different txt file called name2.txt. For example I have this in the txt file: G2010060sample.png G2010061sample.png G2010062sample.png G2010063...

any sample for batch processing in hibernate ?

Can i find the example of batch processing in java hibernate so that i can run delete queries on two tables. ...

Git add submodules to super project from existing repos

Hi I have several (about 10-15) Git repositories in a directory: ~/plugins/admin ~/plugins/editor ~/plugins/etc Each have their own separate repository and remote server. The problem is that to pull all the changes from all the repositories I have to: cd ~/plugins/admin git pull origin master password: ******** cd .. cd ~/plugins/...

Incremetal backups of directories with a batch/shell script

I'm trying to create a script that will automatically backup a complete directory tree. I also want it to work for incremental backups. Basically, it wil work like this: If file is in both source and destination and they are different, source file will be copied If file is in both source and destination and they are the same, nothing w...

How to open file with default application in cmd?

I'm trying to open a file in it's default editor after the user has created the file. So far my script is: @echo off @echo --- Create A New File --- @echo - @echo Where should we put the new file? set /p fileLocation=@ %UserProfile%\ @echo - @echo What do you want to call your new file? set /p fileName=@ @echo - @echo Almost Done! What...

How to automatically import bookmarks in Firefox?

Hi, I would like to know if there is a way to automatically import bookmarks into the Firefox browser from the bookmarks.html file (the one that can be exported from the browser). That is, I want to skip the step of actually going into the browser's menu and import the file manually from there. Could a .bat file be created to do this? ...

Batch file to add character

Hi, if I have a .txt that has the following: 2005050 "2/19/2005" 2005060 "3/1/2005" 2005070 "3/11/2005" 2005080 "3/21/2005" 2005090 "3/31/2005" Is there a way for the batch file to read and always add .png in the end of a character of 7. For example. 2005050.png "2/19/2005" 2005060.png "3/1/2005" 2005070.png "3/11/2005" 200508...

Batch To Remove Character From A String

this may seem basic but Is there a way to create a batch to remove char from a string from a txt file. ? If I already have this inside the .txt file 2005060.png 2005070.png 2005080.png 2005090.png so is there a way to create a batch file that will remove the .png at the end to show only this in a new .txt file 2005060 2005070 2005080 ...

windows batch file programming

I want to write a line of text at a specific line in an already existing text file using dos batch file programming in Windows XP.Also I want to input the line number from the user. Any help will be appreciated. ...

for loop in batch file programming

I have not much knowledge in batch file programming. I like to know the working of for loop mainly. For this i think a small sample program will be helpful to me. So i want a simple program to display the first 'n' natural numbers.Any help please... ...