1
vote
1answer
36 views

Extract a string inside a line without whitespaces beetween other strings

I have a txt like this: [Server] Version=3 DTBNumber=1 [DTB001] DTBName=ODBC;DRIVER=SQL Native Client;UID=MAN;PWD=bingo156;DATABASE=SHITMAN;SERVER=(local); DTBType=5 DTBnUtenti=1 DTBUtenti=002LUCA; ...
0
votes
1answer
2k views

Batch to extract a word from a string inside a text file

I have a database.txt file with this content: 40001 16 DATAMAN Jimbo WS2 I want to extract the third word, as delimited by whitespace ("DATAMAN" ...
0
votes
2answers
754 views

Batch command to delete files from file list [duplicate]

This code works fine. it deletes files from a file list: For /f %%a in (file.lst) do del %%a But why is the below one not working? It deletes the .lst file itself: if exist file.lst ( set ...
0
votes
2answers
211 views

IF statements in batch files

I am currently using Cruise Control to schedule 'builds' for various internal websites. I use batch files to kick off each of these 'builds' (build meaning a specific webhelp output). Let's say ...
0
votes
1answer
487 views

Insert given variable from batch into existing xml file

Here is what I am trying to accomplish...if this can be accomplished with only batch...for now? Instead of actually renaming the client here from the netdom statement, I want to INSERT the ...
0
votes
1answer
156 views

User input in batch file

I have a batch file that looks like this, which takes a picture of a webpage and crops it: cd C:\users\***\Downloads\IECapt-2008-06-10 IECapt --delay=10000 --url=http://test.com/picture.swf?id=1 ...
1
vote
2answers
2k views

Batch to read text files and replace quotes with variables into new file

I have customer pizza lists that I have saved into 5 separate .txt files from my database in this format: Filename = 25Percent.TXT "555-1211" "555-1212" "555-1223" Each list is a phone number in ...
4
votes
1answer
9k views

Get file version from Windows command line for use in a variable?

How do grab the file version/product version from a file on the Windows 7 command line, to be used in a variable in a .bat file?
4
votes
1answer
109 views

Using a system variable with spaces without truncating prematurely

I need to do something similar to this: dir > %USERNAME%.txt But what I get is that if the filename has a SPACE(" ") in it, then the name is cut there. I know that if I do this: set ...
1
vote
7answers
18k views

How to get LAN ip to a variable in a Windows batch file

I'm streaming audio from my Windows 7 laptop to a sound card attached to a router. I have a little batch script to start streaming. REM Kill any instances of vlc taskkill /im vlc.exe "c:\Program ...