Search found 1966 matches

by penpen
01 Oct 2013 14:34
Forum: DOS Batch Forum
Topic: .bat for comparing spreadsheets.
Replies: 2
Views: 2291

Re: .bat for comparing spreadsheets.

If the old database, the update database, and the new database have this format: 126761876286kasdflk 12.30 currency units asakllk128937918978 8.50 currency units ... Or in other words tupels of this form (S/Ns with no space in it, describing string without problematic characters) per line with the l...
by penpen
01 Oct 2013 14:00
Forum: DOS Batch Forum
Topic: Processing text files that have unlimited size lines!
Replies: 24
Views: 18528

Re: Processing text files that have unlimited size lines!

Sorry, aGerman, you have misunderstood, what i've wanted to say about the \n problem. I really haven't described it, so it is my own fault, except if you could read my thoughts via internet . I have used this Test.txt: _V...1434...........V _W...1021....W _X...1020...X _Y...1021....Y _Z...1021....Z ...
by penpen
01 Oct 2013 07:46
Forum: DOS Batch Forum
Topic: Processing text files that have unlimited size lines!
Replies: 24
Views: 18528

Re: Processing text files that have unlimited size lines!

I#ve optimized my script a little bit: @echo off if not "%~1" == "" goto :processFile cmd /K read2.bat "Test.txt" goto :eof :processFile :: %~1 filename setlocal enableDelayedExpansion for %%a in ("%~1") do set "attributes=%%~aa" if not defined attri...
by penpen
01 Oct 2013 07:33
Forum: DOS Batch Forum
Topic: Search a specific string en make an output file.
Replies: 2
Views: 2378

Re: Search a specific string en make an output file.

This may help: (findstr /C:"Translation is SUCCESFUL" Test.txt) >nul if errorlevel 1 ( (echo FAIL)>"results.txt" ) else if errorlevel 0 ( (echo SUCCESS)>"results.txt" ) else ( (echo FAIL)>"results.txt" ) The textfile in this case is Text.txt, just replace it w...
by penpen
30 Sep 2013 12:34
Forum: DOS Batch Forum
Topic: Processing text files that have unlimited size lines!
Replies: 24
Views: 18528

Re: Processing text files that have unlimited size lines!

Sorry i've forgotten one line, i've added it above: Should work now. penpen Edit: But i just found a bug, i'm trying to get rid of it. I found out that \n may be the first character of a line. The bug can be seen on Test.txt: 1022 times X 1023 times Y 1024 times Z And this doesn't produced the bug o...
by penpen
30 Sep 2013 06:36
Forum: DOS Batch Forum
Topic: FTP - in one batch file?
Replies: 40
Views: 26199

Re: FTP - in one batch file?

1) it took me round about 22 years, so nearly 1 language per year.
2) Yes, i did. But commodore basic, batch, turbo pascal, logo, c, c++ assembler i have learned prior.
3) Since i was 14 (commodore basic), since 16 the others.

Btw: You may also use private message system.

penpen
by penpen
30 Sep 2013 06:16
Forum: DOS Batch Forum
Topic: [DEBATABLE] Time to upgrade to Windows 8 from Windows 7?
Replies: 16
Views: 11417

Re: [DEBATABLE] Time to upgrade to Windows 8 from Windows 7?

Adrianvdh wrote:Wait a minute? Is the variable filename the file directory of the local machine?
Yes, it is the path and filename of your local machine, where this batch script is executed.
I 'm not sure but i assume that answers the other question, too.

penpen
by penpen
30 Sep 2013 05:54
Forum: DOS Batch Forum
Topic: FTP - in one batch file?
Replies: 40
Views: 26199

Re: FTP - in one batch file?

Languages than i can use without thinking too much: commodore basic, batch, turbo pascal, logo, c, c++, assembler, html, xml, (xhtml,) javascript, java, latex, perl, matlab, haskell, lisp, c#, vbs, jscript, powerscript, svg (This should be the chronology order i had learned them.) The language that ...
by penpen
30 Sep 2013 05:43
Forum: DOS Batch Forum
Topic: [DEBATABLE] Time to upgrade to Windows 8 from Windows 7?
Replies: 16
Views: 11417

Re: [DEBATABLE] Time to upgrade to Windows 8 from Windows 7?

For the ps script, can I not have a link containg the domian name and the file path following it? set "host=http://my.com/data/file.ext" or can I split the domain from the file path? set "domain=http://my.com/ set "filepath=/data/file.ext" The variable name is suboptimal. W...
by penpen
30 Sep 2013 05:31
Forum: DOS Batch Forum
Topic: Processing text files that have unlimited size lines!
Replies: 24
Views: 18528

Re: Processing text files that have unlimited size lines!

As far as i know (i only have used it under win xp), the end of line has been reached if no further data could be read: @echo off call :processFile "Test.txt" goto :eof :processFile :: %~1 filename setlocal for %%a in ("%~1") do set "attributes=%%~aa" if not defined att...
by penpen
29 Sep 2013 16:50
Forum: DOS Batch Forum
Topic: FTP - in one batch file?
Replies: 40
Views: 26199

Re: FTP - in one batch file?

In this case: The file is not getting corrupted while downloading, it was corrupted when uploading in textmode. In binary mode you download the corrupted data as it actually is. The server may automatically reconstruct it, when downloading in ascii mode, but the error was caused by server sided refo...
by penpen
29 Sep 2013 16:35
Forum: DOS Batch Forum
Topic: [DEBATABLE] Time to upgrade to Windows 8 from Windows 7?
Replies: 16
Views: 11417

Re: [DEBATABLE] Time to upgrade to Windows 8 from Windows 7?

Now I am failing to mimic the above: (...) What can I do? Any help You cannot pass arguments to it, as it is executed as if you have typed that into the powershell command line, so this is the best you can do: @echo off setlocal set "ps=" set "ps=%ps%try {" set "ps=%ps% $fi...
by penpen
29 Sep 2013 15:16
Forum: DOS Batch Forum
Topic: FTP - in one batch file?
Replies: 40
Views: 26199

Re: FTP - in one batch file?

So I find ASCII to be better. Binary tends to corrupt the file. What i've wanted to say above: You are wrong: Transfering in ASCII mode tends to corrupt data, as the byte value 128 then is transformed to 0, 129 to 1, 130 to 2, ... . Transfering in binary mode does not change data intentionally. So ...
by penpen
29 Sep 2013 14:35
Forum: DOS Batch Forum
Topic: FTP - in one batch file?
Replies: 40
Views: 26199

Re: FTP - in one batch file?

The powershell script looks familiar . Am only wanting to use ftp instead of a powershell script I found online (I think other website?) is because ftp.exe and ftp clients can use ascii and the end result of the update it downloaded would be ascii. Maybe you don't understand? For example php, the sc...
by penpen
29 Sep 2013 13:48
Forum: DOS Batch Forum
Topic: [DEBATABLE] Time to upgrade to Windows 8 from Windows 7?
Replies: 16
Views: 11417

Re: [DEBATABLE] Time to upgrade to Windows 8 from Windows 7?

I am currently running Windows 7 as my current OS. But what I am so surprised about is how fast Windows 8 computes my batch files commands, the loading time on Windows 7 on my PC is about 20 seconds to load the batch file, not kidding and Windows 8 only takes about 4-5 seconds. You shouldn't compar...