Search found 949 matches

by ShadowThief
25 Oct 2013 15:29
Forum: DOS Batch Forum
Topic: Batch file Help
Replies: 7
Views: 2271

Re: Batch file Help

Alright, looks like I had an off-by-one error in that for /L loop. Also, I forgot that I had deconstructed the %release_name% variable to get the different parts of it, so I made a backup of the variable and now I'm using that to rename the file. @echo off setlocal enabledelayedexpansion :: Ex. grey...
by ShadowThief
25 Oct 2013 02:19
Forum: DOS Batch Forum
Topic: [SOLVED] copy every 3 line in new x.txt file
Replies: 8
Views: 3285

Re: copy every 3 line in new x.txt file

okay, I added "delims=" to the first for loop

try it now
by ShadowThief
25 Oct 2013 01:35
Forum: DOS Batch Forum
Topic: [SOLVED] copy every 3 line in new x.txt file
Replies: 8
Views: 3285

Re: copy every 3 line in new x.txt file

@echo off setlocal enabledelayedexpansion set every_num=3 set counter=1 for /f "delims=" %%A in (data.txt) do ( set /a mod=!counter!%%%every_num% if !mod!==0 ( echo %%A for /f "tokens=1,2 delims=*" %%B in ("%%A") do echo %%C>>output.txt ) set /a counter+=1 )
by ShadowThief
24 Oct 2013 06:03
Forum: DOS Batch Forum
Topic: LAN game for during internship
Replies: 4
Views: 1614

Re: LAN game for during internship

Also, I highly recommend running the script from the command prompt instead of double clicking on the file. This way, the window doesn't close when the script stops.
by ShadowThief
24 Oct 2013 06:02
Forum: DOS Batch Forum
Topic: LAN game for during internship
Replies: 4
Views: 1614

Re: LAN game for during internship

change if %user1%==%username% goto login if %user2%==%username% goto login to if "%user1%"=="%username%" goto login if "%user2%"=="%username%" goto login and remove the if else in if else echo %username%>>gusers.txt also, change the if not %user1%==%username% ...
by ShadowThief
24 Oct 2013 04:12
Forum: DOS Batch Forum
Topic: LAN game for during internship
Replies: 4
Views: 1614

Re: LAN game for during internship

...so what part doesn't work?
by ShadowThief
23 Oct 2013 12:34
Forum: DOS Batch Forum
Topic: Batch file Help
Replies: 7
Views: 2271

Re: Batch file Help

:: TV warez renamer :: Corrects the release name to include season and episode indicators :: I've literally never seen a release labelled like that but google says its real @echo off setlocal enabledelayedexpansion :: Ex. greys.anatomy.1005.hdtv-lol.mp4 will be renamed to greys.anatomy.s10e05.hdtv-...
by ShadowThief
21 Oct 2013 16:05
Forum: DOS Batch Forum
Topic: [SOLVED]Switches and parameters for creating tasks
Replies: 19
Views: 7018

Re: How to pick which switches and parameters for creating t

serverdelux wrote:I want to create a task that runs as soon as it created


Code: Select all

schtasks /create /tn "task1" /tr "%SystemDrive%\1.bat" /sc onlogon /ru "" >nul
schtasks /run /tn "task1"
by ShadowThief
21 Oct 2013 15:48
Forum: DOS Batch Forum
Topic: [SOLVED]Switches and parameters for creating tasks
Replies: 19
Views: 7018

Re: How to pick which switches and parameters for creating t

Doesn't look like you can run the task with the same command you use to create the task, but you can manually run a task with

Code: Select all

SCHTASKS /Run [Connect_Options] /TN taskname
by ShadowThief
21 Oct 2013 12:59
Forum: DOS Batch Forum
Topic: Cannot display a large record(Ex:more than 5000 characters)
Replies: 15
Views: 4089

Re: Cannot display a large record(Ex:more than 5000 characte

I'm assuming the formatting got messed up when you didn't use the [ code] tags and it should actually look like @echo off SETLOCAL ENABLEEXTENSIONS SETLOCAL ENABLEDELAYEDEXPANSION set filename=nothing SET i=0 for /f "usebackq tokens=*" %%a IN (%~1) DO ( echo %%a set temp=%%~a echo !temp! e...
by ShadowThief
21 Oct 2013 02:23
Forum: DOS Batch Forum
Topic: "Just in time"
Replies: 11
Views: 2939

Re: "Just in time"

if it's am, it will probably be " 9:05" (note the space before the 9)
by ShadowThief
17 Oct 2013 08:27
Forum: DOS Batch Forum
Topic: center text with echo
Replies: 6
Views: 7652

Re: center text with echo

First, figure out how wide your terminal window is. The default is 80 characters, but yours might be different. Next, find the length of the string you wish to center. There are some string length calculation functions on this site, I assume you know how to search. Then subtract the length of the st...
by ShadowThief
17 Oct 2013 06:20
Forum: DOS Batch Forum
Topic: Increment an integer without SET
Replies: 14
Views: 3859

Re: Increment an integer without SET

I'd be really curious to see how somebody could change the value of a variable without using SET.

Closest thing I can think would be

Code: Select all

for /L %%A in (0,1,8191) do (
    rem whatever you're doing with %%A
)
by ShadowThief
14 Oct 2013 15:17
Forum: DOS Batch Forum
Topic: CMD resources on Windows Xp
Replies: 1
Views: 907

Re: CMD resources on Windows Xp

All valid XP commands: http://www.microsoft.com/resources/docu ... x?mfr=true
All valid Vista/7/8/Server 2003/Server 2008 commands: http://technet.microsoft.com/en-us/libr ... 10%29.aspx
by ShadowThief
14 Oct 2013 00:14
Forum: DOS Batch Forum
Topic: another output problem [solved]
Replies: 2
Views: 973

Re: another output problem

The variables aren't printing, right?

Change %color% to %%color%%
Change %computername% to %%computername%%
Change %seconds% to %%seconds%%