Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.
the point is to get my scripts out there for everyone to use.
@echo offtitle Disk Defragmentor ~by lmsmi1color 0aecho -----------------------------echo ------Disk Defragmentor------echo -----------------------------echo --------by lmsmi1------------echo -----------------------------echo .echo .echo Press 1 Then ENTER To Defragment Your C:\ Driveecho Press 2 Then ENTER To Exitset /p choose=if %choose% == 1 goto dfrgif %choose% == 2 goto ext:dfrgREM Connect To Internetclsecho Defragmentingping localhost -n 2 >nulclsecho Defragmenting.ping localhost -n 2 >nulclsecho Defragmenting..ping localhost -n 2 >nulclsecho Defragmenting...ping localhost -n 2 >nulclsecho Your C:\ drive was successfully defragmented! Press ENTER to close Disk echo Defragmentor.pause >nulexit:extexit
patio, about your profile:When you say "Maud Dib", do you mean "ModDB"? As in, the mod database website?
To use to prank or spam out someone. . .obviously you don't appreciate my work, even though this IS the "Batch Programs Thread." You make me sad.
This also includes supposedly "harmless" pranks. This is not what Computer Hope was designed for.
Thanks for the suggestion [Name Withheld]. I will search the web to see if there is another forum where I can post them.
He's playing a game called IRL. Great graphics, *censored* gameplay.
This is the batch program thread, so I posted here.
No...Maud' Dib was the leader of the Fremen in Dune...
*censored* man? Why -3 me? I am just trying to share my work Please point me to a site where I can share my stuff.
To use to prank or spam out someone
If you’re looking for help with getting revenge on someone else or hacking into a program or service look elsewhere. This also includes supposedly "harmless" pranks. This is not what Computer Hope was designed for.
@echo offsetlocal enabledelayedexpansiontitle Renamer v1.1mode con: cols=61 lines=15set origdir=%~dp0set numnam=0call :targetsclscall :startstringclscall :endstringcls:renamingfor /f "delims=" %%F in ('dir /s /b %tarstr%') do ( cls set OldFilePathAndName=%%~dpnxF set OldName=%%~nF set OldFilePath=%%~pF set Extension=%%~xF set FileDate=%%~tF call :SetOldFilePath cls echo !OldName!!Extension! in !OldFilePath! folder echo. set /p Continue=Edit this filename {y,n} if /i "!Continue!"=="y" ( call :EditNameSubroutine ))clsecho You changed the name of !numnam! filesecho You can view the names that were changedecho in the Renamelog.txt file located atecho %origdir%echo.echo Thank you for using Renamer v1.1echo.ping 1.1.1.1 -n 1 -w 10000>nulgoto eof:targets:loopclsecho Is the directory path in the targetdirectory.txt file?set /p yn1={y,n}clsif /i "%yn1%"=="y" ( set /p tardir=<targetdirectory.txt) else ( echo Type full path of target directory set /p tardir=)if exist %tardir% ( cd %tardir%) else ( echo Target does not exist echo Please try again ping 1.1.1.1 -n:1 -w:3000>nul goto loop)echo Is there a target string you want to enter?set /p yn2={y,n}if /i "%yn2%"=="y" ( echo. echo Type target string for renaming set /p tarstr=[Target] set tarstr="*!tarstr!*" cls goto addtarstrques) else ( set tarstr=* goto eof):addstringclsset /p addstr=[Target]set addstr="*%addstr%*"set tarstr=%addstr% %tarstr%echo Searching for strings: %tarstr%:addtarstrquesecho.echo Is there an additional string you wish to look for?set /p yn3={y,n}if /i "%yn3%"=="y" goto addstringgoto eof:startstring:startloopclsecho Is there a standard starting string echo to the naming convention?set /p yn4={y,n}if /i "%yn4%"=="y" ( cls echo Enter standard start string echo [Include an ending space if desired] echo. set /p startstr=) else ( set startstr= goto eof)echo The current start string is "%startstr%"echo Is this okay?set /p yn5={y,n}if /i "%yn5%"=="n" ( set startstr= goto startloop)goto eof:endstringclsecho Is there a standard ending string to the naming convention?set /p yn5={y,n}if /i "%yn5%"=="n" ( set endstr= goto eof )clsecho Would you like the end string toecho include the date the file was createdset /p DateEnd=[y,n]clsif /i "%DateEnd%"=="y" call :DateEndFormattingclsecho Would you like the end string to include echo today's dateset /p yn6={y,n}clsecho Enter standard end stringecho [Include spaces if desired]set /p origendstr=if /i "%yn6%"=="y" call :DateTodayFormattingif "%DateEnd%"=="y" set origendstr=%origendstr%[date created]echo The current end string is "%origendstr%"echo Is this okay?set /p yn7={y,n}if /i "%yn7%"=="n" ( set origendstr= goto endstring)if /i "%DateEnd%"=="y" set origendstr=%origendstr:~0,-14%goto eof:DateEndFormattingecho In what format would you like theecho date to appear:echo.echo 1. dd Mmm yyecho.echo 2. yyyymmddecho.echo 3. Mmm dd, yyyyecho.echo 4. mm/dd/yyecho.echo 5. More...echo.set /p DateEndForm=Selection {1-5}-if "%DateEndForm%"=="5" goto moregoto dateendskip:moreclsecho 6. dd Mmm yyyyecho.echo 7. yy/mm/ddecho.echo 8. mm/dd/yyyyecho.echo 9. yymmddecho.set /p DateEndForm=Selection {6-9}-:dateendskipgoto eof:DateTodayFormattingecho In what format would you like theecho date to appear:echo.echo 1. dd Mmm yyecho.echo 2. yyyymmddecho.echo 3. Mmm dd, yyyyecho.echo 4. mm/dd/yyecho.echo 5. More...echo.set /p DateTodayForm=Selection {1-5}-if "%DateTodayForm%"=="5" goto moregoto settodayform:moreclsecho 6. dd Mmm yyyyecho.echo 7. yy/mm/ddecho.echo 8. mm/dd/yyyyecho.echo 9. yymmddecho.set /p DateTodayForm=Selection {6-9}-:settodayformif "%date:~4,2%"=="01" set todaymonth=Janif "%date:~4,2%"=="02" set todaymonth=Febif "%date:~4,2%"=="03" set todaymonth=Marif "%date:~4,2%"=="04" set todaymonth=Aprif "%date:~4,2%"=="05" set todaymonth=Mayif "%date:~4,2%"=="06" set todaymonth=Junif "%date:~4,2%"=="07" set todaymonth=Julif "%date:~4,2%"=="08" set todaymonth=Augif "%date:~4,2%"=="09" set todaymonth=Sepif "%date:~4,2%"=="10" set todaymonth=Octif "%date:~4,2%"=="11" set todaymonth=Novif "%date:~4,2%"=="12" set todaymonth=Decif "%DateTodayForm%"=="1" set origendstr=%origendstr%%date:~7,2% %todaymonth% %date:~12%if "%DateTodayForm%"=="2" set origendstr=%origendstr%%date:~10%%date:~4,2%%date:~7,2%if "%DateTodayForm%"=="3" set origendstr=%origendstr%%todaymonth% %date:~7,2%, %date:~10%if "%DateTodayForm%"=="4" set origendstr=%origendstr%%date:~4,6%%date:~12%if "%DateTodayForm%"=="6" set origendstr=%origendstr%%date:~7,2% %todaymonth% %date:~10%if "%DateTodayForm%"=="7" set origendstr=%origendstr%%date:~12%/%date:~4,5%if "%DateTodayForm%"=="8" set origendstr=%origendstr%%date:~4%if "%DateTodayForm%"=="9" set origendstr=%origendstr%%date:~12,2%%date:~4,2%%date:~7,2%goto eof:DateEndSetif "!FileDate:~0,2!"=="01" set month=Janif "!FileDate:~0,2!"=="02" set month=Febif "!FileDate:~0,2!"=="03" set month=Marif "!FileDate:~0,2!"=="04" set month=Aprif "!FileDate:~0,2!"=="05" set month=Mayif "!FileDate:~0,2!"=="06" set month=Junif "!FileDate:~0,2!"=="07" set month=Julif "!FileDate:~0,2!"=="08" set month=Augif "!FileDate:~0,2!"=="09" set month=Sepif "!FileDate:~0,2!"=="10" set month=Octif "!FileDate:~0,2!"=="11" set month=Novif "!FileDate:~0,2!"=="12" set month=Decif "%DateEndForm%"=="1" set endstr=%origendstr%!FileDate:~3,2! !month! !FileDate:~8,2!if "%DateEndForm%"=="2" set endstr=%origendstr%!FileDate:~6,4!!FileDate:~0,2!!FileDate:~3,2!if "%DateEndForm%"=="3" set endstr=%origendstr%!month! !FileDate:~3,2!, !FileDate:~6,2!if "%DateEndForm%"=="4" set endstr=%origendstr%!FileDate:~0,6!!FileDate:~8,2!if "%DateEndForm%"=="6" set endstr=%origendstr%!FileDate:~3,2! !month! !FileDate:~6,2!if "%DateEndForm%"=="7" set endstr=%origendstr%!FileDate:~8,2!!FileDate:~0,5!if "%DateEndForm%"=="8" set endstr=%origendstr%!FileDate:~0,10!if "%DateEndForm%"=="9" set endstr=%origendstr%!FileDate:~8,2!!FileDate:~0,2!!FileDate:~3,2!goto eof:SetOldFilePathset OldFilePath=!OldFilePath:~-25,-1!:filepathloopecho !OldFilePath! | find "\" >nulif errorlevel 1 goto eofset OldFilePath=!OldFilePath:~1!goto filepathloop:EditNameSubroutine:editnameclsecho !OldName!echo 012345678911111111112222222222333333333344444444445555555555echo 01234567890123456789012345678901234567890123456789echo.set /p NameStart=Enter Start Position-set /p NameEnd=Enter End Position-set /a NameLength=1+!NameEnd!-!NameStart!if /i "%DateEnd%"=="y" call :DateEndSet else set endstr=%origendstr%call set NewName=%%OldName:~!NameStart!,!NameLength!%%clsecho !NewName!echo Would you like to make changes to this partecho {Start and end strings will be added later}echo.set /p yn10={y,n}if /i "!yn10!"=="y" ( call :setcaps cls echo !NewName! echo. echo Would you like to insert anything into the name set /p yn8={y,n} if /i "!yn8!"=="y" call :insertsubroutine cls echo !NewName! echo. echo Would you like to remove anything from the name set /p yn12={y,n} if /i "!yn12!"=="y" call :removesubroutine)clsecho !NewName!echo.echo Do you need to make any other changes?echo.set /p yn15={y,n}if "%yn15%"=="y" goto editnameset NewName=!startstr!!NewName!!endstr!!Extension!clsecho.echo !NewName!echo.echo Is this correctset /p yn9={y,n}if /i "!yn9!"=="y" ( echo !NewName! from !OldName!!Extension! >>%origdir%\Renamelog.txt ren "!OldFilePathAndName!" "!NewName!" set /a numnam=!numnam!+1) else ( cls echo Would you like to try again echo. set /p yn12={y,n} if /i "!yn12!"=="y" goto editname)goto eof:setcapsset NewName=!NewName:A=a!set NewName=!NewName:B=b!set NewName=!NewName:C=c!set NewName=!NewName:D=d!set NewName=!NewName:E=e!set NewName=!NewName:F=f!set NewName=!NewName:G=g!set NewName=!NewName:H=h!set NewName=!NewName:I=i!set NewName=!NewName:J=j!set NewName=!NewName:K=k!set NewName=!NewName:L=l!set NewName=!NewName:M=m!set NewName=!NewName:N=n!set NewName=!NewName:O=o!set NewName=!NewName:P=p!set NewName=!NewName:Q=q!set NewName=!NewName:R=r!set NewName=!NewName:S=s!set NewName=!NewName:T=t!set NewName=!NewName:U=u!set NewName=!NewName:V=v!set NewName=!NewName:W=w!set NewName=!NewName:X=x!set NewName=!NewName:Y=y!set NewName=!NewName:Z=z!:capsclsecho !NewName!echo.set /p caps=How many capital letters?if "!caps!"=="0" goto eoffor /l %%i in (1,1,!caps!) do ( cls echo Capital Letter %%i echo !NewName! echo 012345678911111111112222222222333333333344444444445555555555 echo 01234567890123456789012345678901234567890123456789 set /p capoff=At Position- set /a endcap=!capoff!+1 call set before=%%NewName:~0,!capoff!%% call set capletter=%%NewName:~!capoff!,1%% call set after=%%NewName:~!endcap!%% set capletter=!capletter:a=A! set capletter=!capletter:b=B! set capletter=!capletter:c=C! set capletter=!capletter:d=D! set capletter=!capletter:e=E! set capletter=!capletter:f=F! set capletter=!capletter:g=G! set capletter=!capletter:h=H! set capletter=!capletter:i=I! set capletter=!capletter:j=J! set capletter=!capletter:k=K! set capletter=!capletter:l=L! set capletter=!capletter:m=M! set capletter=!capletter:n=N! set capletter=!capletter:o=O! set capletter=!capletter:p=P! set capletter=!capletter:q=Q! set capletter=!capletter:r=R! set capletter=!capletter:s=S! set capletter=!capletter:t=T! set capletter=!capletter:u=U! set capletter=!capletter:v=V! set capletter=!capletter:w=W! set capletter=!capletter:x=X! set capletter=!capletter:y=Y! set capletter=!capletter:z=Z! set NewName=!before!!capletter!!after!)clsecho !NewName!echo.echo Are there any additional caps needed?set /p yn14={y,n}if /i "%yn14%"=="y" goto capsgoto eof:insertsubroutine:insertsubclsecho !NewName!echo 012345678911111111112222222222333333333344444444445555555555echo 01234567890123456789012345678901234567890123456789echo To the **right** of what position would echo you like to insert the string?set /p strpos=Right of Position-echo What would you like to insertset /p stradd=[String]call set NewName=%%NewName:~0,!strpos!%%!stradd!%%NewName:~!strpos!%%clsecho !NewName!echo.echo Is there anything else that needs to be addedset /p yn11={y,n}if /i "!yn11!"=="y" goto insertsubgoto eof:removesubroutine:removesubclsecho !NewName!echo 012345678911111111112222222222333333333344444444445555555555echo 01234567890123456789012345678901234567890123456789echo What are the start and end positionsecho of the string to be removed?echo.echo Note that the start position should beecho the last character that you want to stayecho and the end position the last characterecho you want deletedecho.set /p remstpos=Start Position-set /p remenpos=End Position-call set NewName=%%NewName:~0,!remstpos!%%%%NewName:~!remenpos!%%clsecho !NewName!echo.echo Do you need to remove anything elseset /p yn13={y,n}if /i "!yn13!"=="y" goto removesubgoto eof