Search found 1041 matches

by jeb
12 May 2010 12:57
Forum: DOS Batch Forum
Topic: Batch ffmpeg auto convert
Replies: 14
Views: 17113

Re: Batch ffmpeg auto convert

Hi central10, something like this should work @echo off SETLOCAL EnableDelayedExpansion set "latestFile=" call :findlatestfile latestFile ::############################### :monitor call :findlatestfile currentlatestFile if "%currentlatestFile%" NEQ "%latestFile%" ( echo...
by jeb
11 May 2010 09:11
Forum: DOS Batch Forum
Topic: Find and Replace - Date within SQL Query
Replies: 1
Views: 3524

Re: Find and Replace - Date within SQL Query

Hi Tarsinion, I don't understand your problem exactly. But I make a guess, as you can echo the date, you should be able to echo your "new line" like set jahr=%date:~-4% set monat=%date:~-7,2% set tag=%date:~-10,2% set "newLine=and (pb2.pdatetime ^>= '2008/01/20') and (pb2.pdatetime ^<...
by jeb
08 May 2010 05:00
Forum: DOS Batch Forum
Topic: FTP, VNC, HELP
Replies: 2
Views: 3781

Re: FTP, VNC, HELP

Hi Nobre, (((((((Hallo zusammen bin neu hier aber mir gefällt euer Forum sehr da ich hier schon oft hilfe gefunden habe.Nun habe ich ich ein Problem und hoffe ihr könnt mir helfen. Die Batch soll 1) gucken ob VNC leuft wenn nicht es starten, wenn es nicht instaliert ist, instalieren 2) ein programm ...
by jeb
08 May 2010 04:50
Forum: DOS Batch Forum
Topic: Can someone tell me what's wrong with these?
Replies: 1
Views: 2856

Re: Can someone tell me what's wrong with these?

Hi magicbyuriel, the main problems in your code are the comparisions. if %know%==N ( ... If someone type in "Not not" then your line will expand to if Not not==N ( That is legal but absolutly not that what you want. Always enclose variables, that should solve most of your problems if "...
by jeb
06 May 2010 15:46
Forum: DOS Batch Forum
Topic: Experiment with call and label
Replies: 1
Views: 5284

Experiment with call and label

Hi, my cat walks over my computer and this is the result @echo off cls call :#;# %:#+~%,=* >=,;=;,,=,;:%%+,=;echo\=%01>&2&call=;:%%%%%%%%;%* echo *%* OK, for the most of you it is obvious that it is a legal batch file, and what happens But perhaps some newbies have to think about it more tha...
by jeb
06 May 2010 14:07
Forum: DOS Batch Forum
Topic: echo >> hello.bat fail
Replies: 2
Views: 3915

Re: echo >> hello.bat fail

hi dani8190, try it with escape characters echo echo hello ^>^> hello.txt >> hello.bat without the escape character cmd.exe find the first >> hello.txt and suppose to pipe into that file but then cmd.exe found >> hello.bat, and it decides not to pipe to hello.txt, but to hello.bat jeb
by jeb
06 May 2010 13:01
Forum: DOS Batch Forum
Topic: Batch Script to Refresh screen?
Replies: 5
Views: 6336

Re: Batch Script to Refresh screen?

Hmm I doesn't understand why you will solve it that way?

If you write a c++ programm which only calls the api

Code: Select all

#define ES_SYSTEM_REQUIRED 1UL
void main()
{
SetThreadExecutionState(ES_SYSTEM_REQUIRED);
}


you can start that program with your ping method
by jeb
06 May 2010 12:57
Forum: DOS Batch Forum
Topic: echo vertical line from switchs
Replies: 3
Views: 6092

Re: echo vertical line from switchs

Hi milanka,

you are on the right path (replace the characters).

runme.bat:

Code: Select all

@echo off
set "var=%*"
set "var=%var:|=^|%
set "var=%var:&=^&%
echo %var%


Code: Select all

runme.bat echo all ^|

RESULT:
echo all |


jeb
by jeb
06 May 2010 11:44
Forum: DOS Batch Forum
Topic: Batch Script to Refresh screen?
Replies: 5
Views: 6336

Re: Batch Script to Refresh screen?

You are right, you can invoke the key, but (I suppose) it doesn't help,
because it will not reset the windows idle timer.

But perhaps you can use the shutdown to reset the timer

Something like
shutdown /...
and then cancel it with
shutdown /a
by jeb
06 May 2010 10:23
Forum: DOS Batch Forum
Topic: Batch Script to Refresh screen?
Replies: 5
Views: 6336

Re: Batch Script to Refresh screen?

Hi burnleylad_84, I assume that it is not possible with pure dos. But I know how to solve it with C#, it's a simple api call. Perhaps you can call it from vbscript also ( I don't use vbs at all ). public static class SleepPreventer { [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLa...
by jeb
06 May 2010 07:47
Forum: DOS Batch Forum
Topic: Yet another Xcopy question
Replies: 2
Views: 3739

Re: Yet another Xcopy question

Hi kpropell, extend it to backup one extension at each call @echo off setlocal EnableDelayedExpansion EnableExtensions for /F "delims=" %%e in (rawimage.txt) do ( echo backupExtension %%e call :backupExtension %%e ) goto :eof :backupExtension set sourcedir=%CD%\pp\*.%~1 set backupdir=%cd%\...
by jeb
06 May 2010 07:38
Forum: DOS Batch Forum
Topic: Copy files with a same filename within a folder structure
Replies: 2
Views: 3768

Re: Copy files with a same filename within a folder structur

Hi hannes2424, you can use a counter, like here @echo off setlocal EnableDelayedExpansion EnableExtensions Set "sourceDir=%CD%\pp" set z=newfilename set ext=.bak :: copy files rem set the count to a big number for easy format it set count=10000 For /F "delims=" %%f in ('Dir "...
by jeb
04 May 2010 11:44
Forum: DOS Batch Forum
Topic: analysis: ":: is not the same as rem"
Replies: 6
Views: 11785

analysis: ":: is not the same as rem"

Hi, I have made some experiments. Perhaps someone find it usefull, interesting or totally boring. 1. Rem have a different behavior than :: Example1: Bracket test ( rem this works ) ( :: This stops with a sytax error, I suppose that :: is only a lable that can't be called ) 2. The text after a rem or...
by jeb
04 May 2010 10:57
Forum: DOS Batch Forum
Topic: FOR command - help please
Replies: 3
Views: 4429

Re: FOR command - help please

Hi kabalman, the delims is a list of single characters, so you get "C" ":" "\" "f" "o" ... So nearly all of your string seems to be a delimiter. try to use for /f "tokens=*" %%a in (temp.txt) do echo %%~nxa Then you use the standard delims ...
by jeb
22 Apr 2010 10:53
Forum: DOS Batch Forum
Topic: !!!Question about BAT file
Replies: 5
Views: 6278

Re: !!!Question about BAT file

Hi,

perhaps you should write, what part is not working.

What do you see with the debug version?

jeb