Search found 378 matches

by !k
10 Jul 2012 11:59
Forum: DOS Batch Forum
Topic: Merge all txt file in seprate file
Replies: 3
Views: 1151

Re: Merge all txt file in seprate file

Code: Select all

type *.txt >> _all.tmp
move _all.tmp _all.txt
by !k
08 May 2012 00:50
Forum: DOS Batch Forum
Topic: Copy folders with filename
Replies: 10
Views: 3897

Re: Copy folders with filename

Code: Select all

setlocal enabledelayedexpansion
for /f "delims=" %%f in ('dir /b/a-d/s *_imp.png') do (
   set "name=%%~nf"
   ren "%%~dpf." "!name:~0,-4!"
)
by !k
07 May 2012 02:22
Forum: DOS Batch Forum
Topic: can Variables value altered mltiple times in 1 .bat file?
Replies: 6
Views: 1680

Re: can Variables value altered mltiple times in 1 .bat file

Code: Select all

FOR /F "delims=" %%G IN (file_names.txt) DO (
set "k=%%G"
setlocal enabledelayedexpansion
echo "!k!"
endlocal
)
by !k
30 Apr 2012 12:54
Forum: DOS Batch Forum
Topic: How to sort numbers in a text file?
Replies: 19
Views: 6905

Re: How to sort numbers in a text file?

change
for /f "tokens=1* delims==." %%a in ('set . ^|sort /r') do >>outfile.txt echo %%b %%a
by !k
30 Apr 2012 11:44
Forum: DOS Batch Forum
Topic: How to sort numbers in a text file?
Replies: 19
Views: 6905

Re: How to sort numbers in a text file?

setlocal enableextensions for /f "tokens=1,2" %%a in (filez.txt) do ( set "size=............%%b" call set %%size:~-12%%=%%a ) for /f "tokens=1,2 delims==" %%a in ('set .') do >>outfile.txt echo %%a %%b
by !k
25 Apr 2012 07:24
Forum: DOS Batch Forum
Topic: [Solved] Start CMD With Inactive Window
Replies: 9
Views: 3312

Re: [Solved] Start CMD With Inactive Window

alleypuppy wrote:Is there a way to do this without having to download an external program?

:mrgreen:
by !k
21 Apr 2012 10:59
Forum: DOS Batch Forum
Topic: [Solved] Start CMD With Inactive Window
Replies: 9
Views: 3312

Re: Start CMD With Inactive Window

start /b :?:
by !k
17 Apr 2012 07:16
Forum: DOS Batch Forum
Topic: Colored Menu for starting multi task [SOLVED]
Replies: 18
Views: 2698

Re: specify a directory

set folder=%userprofile%\desktop\test
by !k
16 Apr 2012 08:34
Forum: DOS Batch Forum
Topic: HTML file parsing with batch
Replies: 2
Views: 1814

Re: HTML file parsing with batch

Code: Select all

sed -r -n "/<[Aa]\s/{s/.*<[Aa]\s//;s/<\/[Aa]>.*//;p}" index.htm
by !k
15 Apr 2012 03:18
Forum: DOS Batch Forum
Topic: Rename files... for Noob
Replies: 6
Views: 1336

Re: Rename files... for Noob

run it once. it show new names in the tails, like ren "D:\SVD_Tests\3D_Scenes\Characters\3D_Models\Export_Tests\Folder_01\1.obj" "Folder_01__1.obj" ren "D:\SVD_Tests\3D_Scenes\Characters\3D_Models\Export_Tests\Folder_01\2.obj" "Folder_01__2.obj" ... ren "...
by !k
15 Apr 2012 02:47
Forum: DOS Batch Forum
Topic: Rename files... for Noob
Replies: 6
Views: 1336

Re: Rename files... for Noob

if new name from foldername is suit @echo off &setlocal enabledelayedexpansion set "Parent=D:\SVD_Tests\3D_Scenes\Characters\3D_Models\Export_Tests\" for /f "delims=" %%f in ('dir /b/s "%Parent%\??.obj"') do ( for %%r in ("%%~dpf.") do echo ren "%%f&q...
by !k
11 Apr 2012 11:02
Forum: DOS Batch Forum
Topic: echoes text in a specific color - help
Replies: 7
Views: 2349

Re: echoes text in a specific color - help

x64 ?
16-bit programs like .com not works on 64-bit OS
by !k
11 Apr 2012 10:54
Forum: DOS Batch Forum
Topic: remaning files from download in batch
Replies: 5
Views: 1156

Re: remaning files from download in batch

Code: Select all

@echo off &setlocal enableextensions

set "file=image.jpg"

set /a cnt=0
call :next "%file%"
goto :eof

:next
set /a cnt+=1
ren %1 "%~n1%cnt%%~x1" 2>nul ||call :next %1
goto :eof
by !k
07 Apr 2012 06:36
Forum: DOS Batch Forum
Topic: Get Text in Cetrain Lines?
Replies: 6
Views: 1780

Re: Get Text in Cetrain Lines?

Code: Select all

@echo off &setlocal enableextensions

set /a line=5

call :GetLine %line% words.txt
echo line=%$%.

pause
goto :eof

:GetLine
set /a line-=1
for /f "tokens=1" %%a in ('more +%line% %2') do (
   set "$=%%a" &goto :eof
)
by !k
06 Apr 2012 08:55
Forum: DOS Batch Forum
Topic: BATCH rename files using a criterion txt file?
Replies: 18
Views: 5111

Re: BATCH rename files using a criterion txt file?

tinfanide wrote:It does not work, with the cmd window popping out for half a second and disappearing.
remove "echo" in

Code: Select all

   echo ren %1 "%%b.txt"