Search found 3577 matches

by aGerman
25 Mar 2010 11:58
Forum: DOS Batch Forum
Topic: Starting and Stopping Services in Windows
Replies: 6
Views: 5130

Re: Starting and Stopping Services in Windows

Have a look to NET START and NET STOP.
(for help use NET HELP START and NET HELP STOP)

Unfortunately I'm not so familar with this commands.
by aGerman
25 Mar 2010 11:44
Forum: DOS Batch Forum
Topic: Batch file doesn't process parameter
Replies: 6
Views: 3747

Re: Batch file doesn't process parameter

Try this start "" "msaccess.exe" "%~dp0business.mdb" /cmd "orders" or start "" "msaccess.exe" "%cd%\business.mdb" /cmd "orders" The option /wait means that your batch will not continue until you close Access. start "...
by aGerman
24 Mar 2010 12:00
Forum: DOS Batch Forum
Topic: Batch script to move, rename files.?
Replies: 5
Views: 3820

Re: Batch script to move, rename files.?

Untested @echo off &setlocal set "source=D:\Animation\Temp" set "dest_default=D:\Animation\Folder_" set "filename=Face_0001.jpg" set "n=0" pushd "%source%" for /f "delims=" %%a in ('dir /a-d /b *.jpg *.jpeg') do set "file=%%a"...
by aGerman
23 Mar 2010 17:29
Forum: DOS Batch Forum
Topic: Help with batch code
Replies: 11
Views: 4758

Re: Help with batch code

Haha, just for fun:

Code: Select all

@echo off &setlocal

:loop
if not exist "yourFile.txt" goto ahead
ping -n 2 localhost>nul
goto loop

:ahead
echo File was deleted.
pause


Next game...
by aGerman
23 Mar 2010 17:04
Forum: DOS Batch Forum
Topic: Help with batch code
Replies: 11
Views: 4758

Re: Help with batch code

What ever you intend ... if you want to write something like a virus in batch, forget it - other guys had the same idea before. Which file will test if a file exist? Means a deleted batch file can do nothing. Further more ... Batch is a relic of the old DOS OS. What do you think which level you can ...
by aGerman
23 Mar 2010 16:31
Forum: DOS Batch Forum
Topic: Help with batch code
Replies: 11
Views: 4758

Re: Help with batch code

No.
by aGerman
23 Mar 2010 15:55
Forum: DOS Batch Forum
Topic: Help with batch code
Replies: 11
Views: 4758

Re: Help with batch code

Makes no sense, but yes I can. Try @echo off &setlocal set "charsource=abcdefghijklmnopqrstuvwxyz" set /a x1=%random%%%26 set /a x2=%random%%%26 set /a x3=%random%%%26 call set "ext=.%%charsource:~%x1%,1%%%%charsource:~%x2%,1%%%%charsource:~%x3%,1%%" echo %ext% pause Regards ...
by aGerman
23 Mar 2010 14:43
Forum: DOS Batch Forum
Topic: Help with batch code
Replies: 11
Views: 4758

Re: Help with batch code

Double the percent signs for the echo redirection, like %%random%%.

Regards
aGerman
by aGerman
23 Mar 2010 06:33
Forum: DOS Batch Forum
Topic: Remembered network connections in a batch file
Replies: 2
Views: 3413

Re: Remembered network connections in a batch file

Have a look to this example. That could be a way to figure out what you need. @echo off &setlocal set "found=FALSE" for /f "tokens=1,2,3 delims= " %%a in ('net use^|findstr /i /l /c:"\\192.168.1.1\DATA "') do ( set "found=TRUE" set "status=%%a" s...
by aGerman
20 Mar 2010 15:06
Forum: DOS Batch Forum
Topic: batchfile change line
Replies: 2
Views: 2203

Re: batchfile change line

This is not possible. You could read the file line by line, change what you want, write it to a new file and finally replace the old file.
Explain what you wanna do.
by aGerman
20 Mar 2010 12:32
Forum: DOS Batch Forum
Topic: set path variable permanently from batch file.
Replies: 2
Views: 2636

Re: set path variable permanently from batch file.

Have a look to the registry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment REG ADD could help you. Something like: REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v "Path" /t "REG_MULTI_SZ" /d "%path%;C...
by aGerman
17 Mar 2010 13:56
Forum: DOS Batch Forum
Topic: IF statement with FIND
Replies: 1
Views: 1506

Re: IF statement with FIND

Should be something like this: for /f "delims=" %%a in ('mysql.exe -uroot -ppassword --execute^="use db_name^;select field from table^;"') do set "MYSQLOUTPUT=%%a" echo %MYSQLOUTPUT%|find "string" >nul && ( rem DO this ) || ( rem goto another function )
by aGerman
17 Mar 2010 13:32
Forum: DOS Batch Forum
Topic: two batch windows sync
Replies: 2
Views: 2090

Re: two batch windows sync

There is no real good possibility for such an intention. The first batch have to write to a file and the second batch have to read this file using an endless loop. 1.bat @echo off &setlocal type nul>"data.txt" echo Enter your text: echo. :loop set "input=" set /p "input=...
by aGerman
13 Mar 2010 11:19
Forum: DOS Batch Forum
Topic: Opening Webpages?
Replies: 3
Views: 2037

Re: Opening Webpages?

There is no way using native batch. If it would be possible to operate on your special web page only with the keyboard (without mouse) then the SendKeys method (VBScript) could be a possibility.
http://msdn.microsoft.com/en-us/library/8c6yea83%28VS.85%29.aspx

Regards
aGerman