Search found 23 matches
- 02 Apr 2013 04:31
- Forum: DOS Batch Forum
- Topic: splitting a variable when there are special characters
- Replies: 12
- Views: 10098
Re: splitting a variable when there are special characters
It most certainly does work. Here is the output. Copy and paste the code for yourself. " ABC:0|Output inc.|SOFTWARE VER|v1.1|123|ALLOFMYDATAISFROMTHISPOINTONWARDSANDDOESNOTCONTAINANYSPECIALCHARS" If it does not work in your situation then you haven't supplied real life data to see where i...
- 02 Apr 2013 04:10
- Forum: DOS Batch Forum
- Topic: splitting a variable when there are special characters
- Replies: 12
- Views: 10098
Re: splitting a variable when there are special characters
It most certainly does work. Here is the output. Copy and paste the code for yourself. " ABC:0|Output inc.|SOFTWARE VER|v1.1|123|ALLOFMYDATAISFROMTHISPOINTONWARDSANDDOESNOTCONTAINANYSPECIALCHARS" If it does not work in your situation then you haven't supplied real life data to see where i...
- 02 Apr 2013 03:10
- Forum: DOS Batch Forum
- Topic: splitting a variable when there are special characters
- Replies: 12
- Views: 10098
Re: splitting a variable when there are special characters
set var=123456 Set newvar=%var:~2,4% echo %newvar% should give me 3456 (i think) Here is my problem, i have a string of about 100 digits where the first 46 are not needed, however it contains <>. When i do the above to split it up a bit, it doesnt work. This will work to set the variable. set "...
- 28 Mar 2013 11:02
- Forum: DOS Batch Forum
- Topic: splitting a variable when there are special characters
- Replies: 12
- Views: 10098
Re: splitting a variable when there are special characters
Brilliant, however i missed something - 6th field onwards... there are about 9 or 10 fields..
- 28 Mar 2013 10:48
- Forum: DOS Batch Forum
- Topic: splitting a variable when there are special characters
- Replies: 12
- Views: 10098
- 28 Mar 2013 09:37
- Forum: DOS Batch Forum
- Topic: splitting a variable when there are special characters
- Replies: 12
- Views: 10098
splitting a variable when there are special characters
set var=123456 Set newvar=%var:~2,4% echo %newvar% should give me 3456 (i think) Here is my problem, i have a string of about 100 digits where the first 46 are not needed, however it contains <>. When i do the above to split it up a bit, it doesnt work. Thu Mar 28 00:00:51 2013: <456>Mar 28 00:02:43...
- 05 Mar 2012 15:46
- Forum: DOS Batch Forum
- Topic: encrypting data from the command line
- Replies: 2
- Views: 3224
Re: encrypting data from the command line
Found a solution, gpg, it allows you to encrypt the file(s) just by specifying a name - to decrypt them you have to provide the key for the certificate.
Best of all, it's free
Best of all, it's free

- 05 Mar 2012 10:25
- Forum: DOS Batch Forum
- Topic: encrypting data from the command line
- Replies: 2
- Views: 3224
encrypting data from the command line
not really a batch file question as such, but.. has anyone had the need to encrypt data from the command line using public/private keys or similar? The issue is the password being in the batch file, i need to find some way of encrypting some data from the command line using a password (stored in the...
- 17 Feb 2012 10:03
- Forum: DOS Batch Forum
- Topic: using echo to enter text in a file and carriage return
- Replies: 21
- Views: 32207
Re: using echo to enter text in a file and carriage return
ok, one last stab at it. I'd post images of the real stuff but it contains sensitive information. This is as close to the real scenario i can get.. The actual email contains some detail about things set, file locations and suffixes etc, then the output of an FTP session. the final part is checking b...
- 17 Feb 2012 07:36
- Forum: DOS Batch Forum
- Topic: using echo to enter text in a file and carriage return
- Replies: 21
- Views: 32207
Re: using echo to enter text in a file and carriage return
What would this have to do with Outlook when you were using Bmail and Blat? blat/bmail send the file via smtp as the body of an email. Outlook is where i am reading it. yes I realize what Bmail and Blat do. You just made it sound like your script issue was an issue with Outlook. well the issue is w...
- 17 Feb 2012 07:19
- Forum: DOS Batch Forum
- Topic: using echo to enter text in a file and carriage return
- Replies: 21
- Views: 32207
Re: using echo to enter text in a file and carriage return
Squashman wrote:What would this have to do with Outlook when you were using Bmail and Blat?
blat/bmail send the file via smtp as the body of an email. Outlook is where i am reading it.
- 17 Feb 2012 06:56
- Forum: DOS Batch Forum
- Topic: using echo to enter text in a file and carriage return
- Replies: 21
- Views: 32207
Re: using echo to enter text in a file and carriage return
blat has the same end scenario. the issue i believe is outlook and something called 'extra line breaks' doubtful i'll ever get to the bottom of the issue, but i stick by what i posted yesterday. I have a text file thats been ouput, it contains about 40 lines. the first 30 format 100% correct in the ...
- 16 Feb 2012 11:24
- Forum: DOS Batch Forum
- Topic: using echo to enter text in a file and carriage return
- Replies: 21
- Views: 32207
Re: using echo to enter text in a file and carriage return
Text sent to a file during normal "Echo" has ".." or "0D 0A" (CR/LF) Text sent directly after using findstr has " .." or "20 0D 0A" (space CR/LF) Can't relate this to your previous code directly. But in case it matters, note that the 'echo' line car...
- 16 Feb 2012 11:05
- Forum: DOS Batch Forum
- Topic: using echo to enter text in a file and carriage return
- Replies: 21
- Views: 32207
Re: using echo to enter text in a file and carriage return
After much trawling the net before and after my previous post i happened upon a forum that suggested putting spaces in front of the data would break this habit.. findstr somethig.... Echo test >> myfile.txt Echo test >> myfile.txt results is: test test Which is better than test test
- 16 Feb 2012 10:23
- Forum: DOS Batch Forum
- Topic: using echo to enter text in a file and carriage return
- Replies: 21
- Views: 32207
Re: using echo to enter text in a file and carriage return
This is still driving me up the wall!! but i've found a difference using a hex editor. Sample text from the file during normal echo 4A 61 6E 20 31 30 20 30 36 3A 33 32 3A 33 37 20 Jan 10 06:32:37 32 30 30 30 0D 0A 43 6F 6E 6E 65 63 74 65 64 20 2000..Connected Sample text from the file after using fi...