Search found 442 matches

by orange_batch
30 Aug 2010 22:07
Forum: DOS Batch Forum
Topic: (SOLVED) Merging files .bat
Replies: 2
Views: 3527

Re: Merging files .bat

I solved your second question in the previous thread, so I'm not going to write you a solution for this, unless it really is a new question. It's not hard but still a little more complicated, especially if header.txt contains multiple lines.
by orange_batch
30 Aug 2010 22:02
Forum: DOS Batch Forum
Topic: (SOLVED-again) Write each line of text to newtext.txt
Replies: 10
Views: 10142

Re: Write each line of text to newtext.txt

If line is line 1, stores it in a variable. If not line 1, puts line 1 variable plus current line of "my text.txt" into it's corresponding "file #.txt". Includes blank lines. setlocal enabledelayedexpansion for /f "delims=] tokens=1*" %%x in ('type "my text.txt&quo...
by orange_batch
30 Aug 2010 09:58
Forum: DOS Batch Forum
Topic: (SOLVED-again) Write each line of text to newtext.txt
Replies: 10
Views: 10142

Re: Write each line of text to newtext.txt

Puts each line of "my text.txt" into it's corresponding "file #.txt". Includes blank lines. setlocal enabledelayedexpansion for /f "delims=] tokens=1*" %%x in ('type "my text.txt" ^| find /v /n ""') do ( set /a counter+=1 echo:%%y>"file !counter...
by orange_batch
27 Aug 2010 16:14
Forum: DOS Batch Forum
Topic: Windows 7 has Black Holes - Data is lost with no retrieval.
Replies: 3
Views: 4751

Re: Windows 7 has Black Holes - Data is lost with no retriev

I'm not sure. There must be some kind of particular bug report for Windows 7.
by orange_batch
27 Aug 2010 03:03
Forum: DOS Batch Forum
Topic: Help using CD with a variable for use with FTP script
Replies: 6
Views: 6130

Re: Help using CD with a variable for use with FTP script

Come on Alan, you're supposed to know exactly what each of these people's working environment is! :lol:
by orange_batch
26 Aug 2010 23:47
Forum: DOS Batch Forum
Topic: Copying?
Replies: 4
Views: 5499

Re: Copying?

Yes, but you can modify the code of course. Remember to change C:\...\Target Folder to your, target folder. If you change: ("C:\...\Target Folder\*.png") to ("%~1\*.png") you can instead drag and drop any folder onto the batch file, and it will run the process in any .pngs in tha...
by orange_batch
26 Aug 2010 21:07
Forum: DOS Batch Forum
Topic: Copying?
Replies: 4
Views: 5499

Re: Copying?

It's the right forum. Easy as pie, buddy. @echo off&echo:&color B&title Make folder, move and rename PNGs by orange_batch for %%x in ("C:\...\Target Folder\*.png") do ( md "%%~dpnx" move "%%x" "%%~dpnx" ren "%%~dpnx\%%~nxx" icon.png echo:...
by orange_batch
26 Aug 2010 20:33
Forum: DOS Batch Forum
Topic: Please enable Posting an Image instead of 10,000 words !
Replies: 1
Views: 3000

Re: Please enable Posting an Image instead of 10,000 words !

Well, it should be basic internet / forum use knowledge...

I recommend http://www.imageftw.com and http://www.sendspace.com.
by orange_batch
26 Aug 2010 20:28
Forum: DOS Batch Forum
Topic: Windows 7 has Black Holes - Data is lost with no retrieval.
Replies: 3
Views: 4751

Re: Windows 7 has Black Holes - Data is lost with no retriev

Interesting.

Are you just testing OS behaviour, or does this affect your scripting somehow?

It may be pointless or known to them, but have you thought of reporting it to Microsoft?

8)
by orange_batch
26 Aug 2010 04:32
Forum: DOS Batch Forum
Topic: Find the "programm files" folder for both platform: 32/64bit
Replies: 1
Views: 3428

Re: Find the "programm files" folder for both platform: 32/6

It looks okay, but surrounding a whole assignment in quotations is safer because Command Prompt reads the characters as a string instead of literal/command characters. SET "PF=%PROGRAMFILES%" IF /i NOT "%PROCESSOR_ARCHITECTURE%"=="x86" SET "PF=%PF% (x86)" ECHO...
by orange_batch
25 Aug 2010 16:55
Forum: DOS Batch Forum
Topic: Creating fold using trime date stamp
Replies: 10
Views: 10165

Re: Creating fold using trime date stamp

Yeah, that's easy.

Code: Select all

echo:Failure at: %date% %time%>>c:\log.txt


Even better if you can forward a variable with information about what failed.
by orange_batch
25 Aug 2010 16:49
Forum: DOS Batch Forum
Topic: Batch file working on XP x32 but not x64
Replies: 1
Views: 2944

Re: Batch file working on XP x32 but not x64

Sounds odd. Perhaps tasklist behaves differently under x64, or the path to notepad isn't known to DOS/start. No need for search.log though. for /f "skip=2" %%x in ('tasklist /fi "imagename eq notepad.exe" /fo csv 2^>nul') do exit start "" /min mplayer2 "c:\Windows\...
by orange_batch
25 Aug 2010 16:33
Forum: DOS Batch Forum
Topic: how to write a file to open a program and enter text in it
Replies: 3
Views: 4035

Re: how to write a file to open a program and enter text in

You can't give a program focus using batch, unless the program itself will only allow 1 instance and loading it again gives it focus. If it's an issue, you might try a sequence involving alt+tab, or ctrl+shift+escape to open the task manager and using Switch To under Applications. Try www.autohotkey...
by orange_batch
25 Aug 2010 11:23
Forum: DOS Batch Forum
Topic: dates in a batch file
Replies: 4
Views: 6084

Re: dates in a batch file

Ah yes, I must have been tired again because I read xcopy and that function of /d: somehow flew over my head, lol. If it does the job (which it does in this case) I would recommend that before robocopy due to it being preinstalled as well.