Code: Select all
type *.txt >> _all.tmp
move _all.tmp _all.txt
Code: Select all
type *.txt >> _all.tmp
move _all.tmp _all.txt
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!"
)
Code: Select all
FOR /F "delims=" %%G IN (file_names.txt) DO (
set "k=%%G"
setlocal enabledelayedexpansion
echo "!k!"
endlocal
)
for /f "tokens=1* delims==." %%a in ('set . ^|sort /r') do >>outfile.txt echo %%b %%a
alleypuppy wrote:Is there a way to do this without having to download an external program?
Code: Select all
sed -r -n "/<[Aa]\s/{s/.*<[Aa]\s//;s/<\/[Aa]>.*//;p}" index.htm
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
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
)
remove "echo" intinfanide wrote:It does not work, with the cmd window popping out for half a second and disappearing.
Code: Select all
echo ren %1 "%%b.txt"