Search found 19 matches
- 20 Nov 2010 08:45
- Forum: DOS Batch Forum
- Topic: Reading variables from a text file Using For /F command
- Replies: 15
- Views: 18383
Re: Reading variables from a text file Using For /F command
Wow, people on this forum really work hard to solve problems diligently. That's just great. This is a very helpful forum. I thought I add my little bit of help. When faced with text files that have special characters (commas, colons, quotes, double quotes, exclaimation marks, tabs, etc.) that are so...
- 19 Nov 2010 18:47
- Forum: DOS Batch Forum
- Topic: How to find a string but not as a substring
- Replies: 5
- Views: 6720
Re: How to find a string but not as a substring
This requires regular expressions. For this, you need biterscripting in Windows. Download it from any free download website. Enter this command in biterscripting. stex -r -c "^,project,^" " project projectile myproject" You will see the results. -r means regular expression. -c me...
- 15 Aug 2010 13:11
- Forum: DOS Batch Forum
- Topic: Find and replace batch file
- Replies: 2
- Views: 4323
Re: Find and replace batch file
Here is one possible script. I have assumed that your input file is at C:/xyz.xml. # Script FAR.txt var str content, value cat "C:/xyz.xml" > $content sal -r -c "^<propname name=\"Group.duration\>&</propname\>^" ("^<propname name=\"Group.duration\>"+$value...
- 05 Aug 2010 15:03
- Forum: DOS Batch Forum
- Topic: help - replace multiple strings from a file in another file
- Replies: 11
- Views: 19863
Re: help - replace multiple strings from a file in another f
# Script ReplaceWords.txt var string list, line, word1, word2, content cat "C:/test/destin.txt" > $content ; cat "C:/test/string.txt" > $list lex "1" $list > $line while ($line <> "") do wex "1" $line > $word1 ; wex "1" $line > $word2 echo...
- 16 Jul 2010 14:21
- Forum: DOS Batch Forum
- Topic: Batch FTP rename
- Replies: 2
- Views: 4952
Re: Batch FTP rename
Try a script like this - http://www.biterscripting.com/helppages ... pload.html .
It doesn't do exactly what you are attempting to do. But it will give an idea of how to loop thru files within an FTP session from a batch script.
It doesn't do exactly what you are attempting to do. But it will give an idea of how to loop thru files within an FTP session from a batch script.
- 28 Jun 2010 10:48
- Forum: DOS Batch Forum
- Topic: How to replace special characters...
- Replies: 4
- Views: 13672
Re: How to replace special characters...
I think Jeb provided an excellent response. If you want to do more fancy automated editing, you may want to consider these commands. m I was unsure if you wanted to remove the entire html tags or just wanted to manipulate only some characters. If you want to remove the html tags (convert html source...
- 13 Jun 2010 11:57
- Forum: DOS Batch Forum
- Topic: Help with batch file...
- Replies: 2
- Views: 4729
Re: Help with batch file...
Possible alternative. Can also use a script like http://www.biterscripting.com/SS_FTPUpload.html .
- 09 May 2010 13:00
- Forum: DOS Batch Forum
- Topic: Watch a folder for new .jpg's and open them with photshop
- Replies: 4
- Views: 6974
Re: Watch a folder for new .jpg's and open them with photsho
Hello. This script will watch for .jpg files in folder "C:\batch" and open the new .jpg files. I have added comments so you can see what the script is doing. # Script NewJpg.txt var str newList, prevList, newFile cd "C:\batch" while (true) do # Collect the new list of .jpg files....
- 16 Mar 2010 10:30
- Forum: DOS Batch Forum
- Topic: [Help]Finding or Searching File in your own Computer.
- Replies: 2
- Views: 5032
Re: [Help]Finding or Searching File in your own Computer.
I doubt if I am a pro, but here is a solution anyway using biterscripting. To search for a file lf -r -n -g "*example*" "C:/somefolder" will show all files matching the pattern "example*" under the folder tree at "C:/somefolder". To search for a string within ...
- 07 Feb 2010 10:52
- Forum: DOS Batch Forum
- Topic: compare files and echo message
- Replies: 7
- Views: 9732
Re: compare files and echo message
Nice site. Lots of helpful people. Lots of answers. Anyway, back to the point. Being a teacher, I will take a theoretical approach. You have a few things going on here when comparing files. - File content the same ? - File exists or not ? - File empty or not ? ( I will generalize - Size the same ? )...
- 17 Jan 2010 10:23
- Forum: DOS Batch Forum
- Topic: Date calculation using bat and txt file
- Replies: 5
- Views: 8507
- 07 Jan 2010 16:30
- Forum: DOS Batch Forum
- Topic: Date calculation using bat and txt file
- Replies: 5
- Views: 8507
Parsing dates and calculating time differences
Parsing a file, extracting contents, and calculating time differences - I had to take this challenge. Here is a script - I have added tons of comments so you can follow the logic. # Script Check.txt var str content, line, time, currenttime, timediff day, month, year # Get current time set $currentti...
- 16 Dec 2009 14:16
- Forum: DOS Batch Forum
- Topic: Synchronizing batch scripts execution
- Replies: 0
- Views: 5006
Synchronizing batch scripts execution
I was asked this question. I am posting an answer here in case others have this same question and are looking for a solution. Here is the original question (reworded). I administer several computers. I have to run a batch script on each one of them. This batch script is in file C:\EODProcessing.bat....
- 07 Dec 2009 11:28
- Forum: DOS Batch Forum
- Topic: DOS reverse redirection
- Replies: 3
- Views: 5923
- 19 Oct 2009 08:50
- Forum: DOS Batch Forum
- Topic: Extract text from a textfile
- Replies: 2
- Views: 5823
Scipt to extract ip address
# Script ip.txt var str text ; cat "C:/folder/file.txt" > $text while ( { sen -r -c "^Host&\n^" $text } > 0 ) do var str ip ; stex -r -c "^Host&\n^" $text > $ip stex -r "]^(0>9)^" $ip > null ; stex -r "^(0>9)^l]&...