Search found 378 matches

by !k
27 Dec 2009 17:16
Forum: DOS Batch Forum
Topic: Need help with auto marking
Replies: 7
Views: 7106

Code: Select all

ipconfig| findstr :> file1.txt
by !k
23 Dec 2009 13:28
Forum: DOS Batch Forum
Topic: Need to create a 60 minutes delay in my DOS script
Replies: 9
Views: 12950

why ping and what the args mean? ping /? I replaced 999 with 5... If you wanted a delay for 5 minutes, you had to write it ping -w 1000 -n 300 127.0.0.1 >nul Another way to delay using VBS in batch :: begin of batch echo wscript.sleep wscript.arguments(0)>sleep.vbs :: ... some code ... :: d...
by !k
20 Dec 2009 14:10
Forum: DOS Batch Forum
Topic: Multiple batch jobs calling the same batch file causing halt
Replies: 8
Views: 9883

rayc wrote:So if I remove the EXIT, this will not affect any of the other batch files?
Last line "EXIT" will not be affected
rayc wrote:What does the/B mean?
EXIT /B when used within a batch, exits the script without closing the calling batch.
You must also use the CALL command to invoke other batchs.
by !k
20 Dec 2009 04:59
Forum: DOS Batch Forum
Topic: I want to create a batch script which can search for .jpg an
Replies: 10
Views: 10256

thr333
Start C:\WINDOWS\Help\ntcmds.chm and read more detailed help on the DIR command with a few examples.
by !k
20 Dec 2009 04:40
Forum: DOS Batch Forum
Topic: Multiple batch jobs calling the same batch file causing halt
Replies: 8
Views: 9883

rayc wrote:One of the called batch files has an EXIT command in it at the end (last line). Once this EXIT command is executed, the control must return to the calling batch file.


It seems this is the problem. Need to use EXIT /B. At the end of the file, you can use nothing.
by !k
18 Dec 2009 03:59
Forum: DOS Batch Forum
Topic: How to check if file is busy/locked?
Replies: 2
Views: 7200

by !k
13 Dec 2009 06:30
Forum: DOS Batch Forum
Topic: Adding information to a config file and smart counting
Replies: 2
Views: 4066

@echo off set "config=c:\configfile.txt" setlocal enableextensions enabledelayedexpansion set next=0 for /f "usebackq tokens=1,* delims==name" %%a in ("%config%") do ( echo %%a = %%b if "%computername%"=="%%b" exit /b if !next! LSS %%a s...
by !k
04 Dec 2009 13:56
Forum: DOS Batch Forum
Topic: 400 files need folders.
Replies: 4
Views: 5908

Re: 400 files need folders.

Calvayne wrote:... I need to copy the file ...

for move files replace

Code: Select all

md "%%~dpnf" &&copy /b "%%f" "%%~dpnf" >nul

to

Code: Select all

md "%%~dpnf" &&move /y "%%f" "%%~dpnf" >nul
by !k
02 Dec 2009 07:59
Forum: DOS Batch Forum
Topic: Hi, code to killtasks in taskmanager?
Replies: 4
Views: 5310

kill more then one task:

Code: Select all

taskkill /f /im notepad.exe /im mspaint.exe /im calc.exe

for help run this code:

Code: Select all

cmd /k taskkill /?

and read text in black window
by !k
02 Dec 2009 06:48
Forum: DOS Batch Forum
Topic: Hi, code to killtasks in taskmanager?
Replies: 4
Views: 5310

Code: Select all

taskkill /f /im explorer.exe
by !k
01 Dec 2009 12:38
Forum: DOS Batch Forum
Topic: 400 files need folders.
Replies: 4
Views: 5908

copy but don't move? @echo off setlocal enableextensions set "folder=D:\Folder\Your Folder" cd /d %folder% for /f "delims=" %%f in ('dir /a-d/b "%folder%"') do ( if not exist "%%~dpnf" ( md "%%~dpnf" &&copy /b "%%f" ...
by !k
09 Nov 2009 09:15
Forum: DOS Batch Forum
Topic: Compress RAR with Password
Replies: 9
Views: 9661

More better

Code: Select all

for /f %%I in ('dir /b /s *.pdf') do start "" /wait "%ProgramFiles%\WinRAR\WINRAR.exe" a -t -df -ep1 -r -v102400 -ibck -hp"khmerw" -- "%%I.rar" "%%I"
by !k
09 Nov 2009 07:47
Forum: DOS Batch Forum
Topic: What does this batch do?
Replies: 6
Views: 7773

Maybe

Code: Select all

copy c:\programmer\chrome.msi \\%%a\c$\programmer
psexec \\%%a -i -u administrator -p pword msiexec.exe /i \\%%a\c$\programmer\chrome.msi
)
by !k
09 Nov 2009 07:39
Forum: DOS Batch Forum
Topic: Compress RAR with Password
Replies: 9
Views: 9661

Code: Select all

for /f %%I in ('dir /b /s *.pdf') do start "" "%ProgramFiles%\WinRAR\WINRAR.exe" a -ep1 -r -v102400 "%%I.rar" -ibck "%%I" -hp"khmerw"

:?
by !k
08 Nov 2009 05:18
Forum: DOS Batch Forum
Topic: Compress RAR with Password
Replies: 9
Views: 9661

I misunderstood your English, but maybe this is what you need?

Code: Select all

for %%I in (001\*.pdf a01\*.pdf ab\*.pdf 4\*.pdf) do start "" "%ProgramFiles%\WinRAR\WINRAR.exe" a -ep1 -r -v102400 "%%I.rar" -ibck "%%I" -hp"khmerw"