Search found 3623 matches

by aGerman
16 May 2010 12:49
Forum: DOS Batch Forum
Topic: Batch ffmpeg auto convert
Replies: 14
Views: 8554

Re: Batch ffmpeg auto convert

Well the c in /tc is for Creation. Other options would be /ta for Last Access /tw for Last Written If /tc doesn't work then you should try /ta . Regards aGerman [EDIT] Think I found the problem. In each iteration of :monitor you have to call the :findlatestfile function to get the new latest file. :...
by aGerman
15 May 2010 13:46
Forum: DOS Batch Forum
Topic: modify batch script for extrating two files
Replies: 1
Views: 1433

Re: modify batch script for extrating two files

As far as I remember you can write several files behind the mget command

Code: Select all

SET Fltr="TLUS2*.* TLUS3*.* TLUS4*.*"

Give it a try.

Regards
aGerman
by aGerman
15 May 2010 13:20
Forum: DOS Batch Forum
Topic: Batch ffmpeg auto convert
Replies: 14
Views: 8554

Re: Batch ffmpeg auto convert

I think you misunderstood. I talked about the switch (option) of the DIR command. In this line:- for /F "delims=" %%a in ('dir /b /od *.avi 2^> nul') DO ( set %~1=%%a ) ... you could try to replace the switch /od by /tc to finally get this line:- for /F "delims=" %%a in ('dir /b ...
by aGerman
14 May 2010 12:04
Forum: DOS Batch Forum
Topic: Batch ffmpeg auto convert
Replies: 14
Views: 8554

Re: Batch ffmpeg auto convert

Hi,

if you work on a NTFS formatted drive you could use the DIR switch /TC instead of /OD.

Regards
aGerman
by aGerman
10 May 2010 13:33
Forum: DOS Batch Forum
Topic: Close program without killing process
Replies: 1
Views: 2407

Re: Close program without killing process

I don't know another possibility with native batch. But you could try to implement a small VBScript for simulating the short cut "Alt+F4". Firefox as an example *.bat @echo off &setlocal set "process=firefox.exe" for /f "tokens=2" %%i in ('tasklist /nh /fi "ima...
by aGerman
08 May 2010 09:42
Forum: DOS Batch Forum
Topic: Watch a folder for new .jpg's and open them with photshop
Replies: 4
Views: 3241

Re: Watch a folder for new .jpg's and open them with photsho

what I want the program to do is to watch a folder for new incoming .jpg files that are just made by a camera somewhere else in the network, the use for this program is to make an other computer in the network open the .jpg files before I am even close to the computer, so speed is of the essence. W...
by aGerman
08 May 2010 07:20
Forum: DOS Batch Forum
Topic: Watch a folder for new .jpg's and open them with photshop
Replies: 4
Views: 3241

Re: Watch a folder for new .jpg's and open them with photsho

To open all *.jpg files is an easy issue by using a FOR loop and START. for /f "delims=" %%a in ('dir /a-d /b "C:\batch\*.jpg"') do ( start "" "mspaint.exe" "%%a" ) Replace mspaint.exe with the photoshop exe file (maybe you will need the full name). ...
by aGerman
07 May 2010 13:15
Forum: DOS Batch Forum
Topic: Silent install for flash 10, firefox 3.6.3 and ie 8
Replies: 1
Views: 2265

Re: Silent install for flash 10, firefox 3.6.3 and ie 8

Three setups at the same time? IMO not a good idea. You should use
start "" /wait ...

I'm not sure, but AFAIK you have to use the following switches:
-ms for Firefox and
/silent for Flash Player

Regards
aGerman
by aGerman
05 May 2010 11:21
Forum: DOS Batch Forum
Topic: FOR command - skip first row in the file
Replies: 1
Views: 14310

Re: FOR command - skip first row in the file

During the run time of a command line the value of a variable will be expanded only once. A multiline FOR loop is interpreted as only one command line. This means the value of %counter% is 0 inside your FOR loop and seems not to be changed... I could write even more, but it's a bit off topic. To sol...
by aGerman
04 May 2010 12:36
Forum: DOS Batch Forum
Topic: tolower
Replies: 2
Views: 1646

Re: tolower

The parameter is only the name of the variable. Example: @echo off &setlocal echo %username% call :toLower username echo %username% pause goto :eof :toLower str -- converts uppercase character to lowercase :: -- str [in,out] - valref of string variable to be converted :$created 20060101 :$change...
by aGerman
04 May 2010 11:02
Forum: DOS Batch Forum
Topic: FOR command - help please
Replies: 3
Views: 2094

Re: FOR command - help please

Why so complicated?

Code: Select all

for /f "delims=" %%a in (temp.txt) do echo %%~nxa

n is for name and x is for extension
Have a look to the help (for /?) and you will find more options.

Regards
aGerman

[edit]@jeb - da hat wohl einer rechts überholt :wink: [/edit]
by aGerman
03 May 2010 12:37
Forum: DOS Batch Forum
Topic: Looking for a batch file to move files "greater than"
Replies: 2
Views: 1737

Re: Looking for a batch file to move files "greater than"

"Bigger is better" for the same font - is this a joke? How ever. Try something like that @echo off &setlocal set "source=D:\your\path" set "destn=E:\your\path" pushd "%source%" for /f "delims=" %%a in ('dir /a-d /b *.ttf *.otf') do ( set "na...
by aGerman
03 May 2010 05:16
Forum: DOS Batch Forum
Topic: Read Different Lines Into Different Variable
Replies: 3
Views: 2305

Re: Read Different Lines Into Different Variable

Another possibility could be this: my.ini [general] value1=a value2=b my.bat @echo off &setlocal for /f "delims=" %%a in ('findstr /r /v /c:"^\[.*\]$" "my.ini"') do set "%%a" echo %value1% echo %value2% pause regards aGerman
by aGerman
01 May 2010 08:59
Forum: DOS Batch Forum
Topic: How to Redirect error to pipe not File, eg 2| not 2>
Replies: 6
Views: 5319

Re: How to Redirect error to pipe not File, eg 2| not 2>

Alan I experimented a lot (because you made me curios ). Finally I think I found a way. >nul -redirects the stdOut to NUL 2>&1 -merges stdErr and stdOut >nul 2>&1 -in this order it appends stdErr to stdOut, then it redirects both to NUL So far. What about 2>&1 >nul I figured out that thi...
by aGerman
30 Apr 2010 17:13
Forum: DOS Batch Forum
Topic: How to Redirect error to pipe not File, eg 2| not 2>
Replies: 6
Views: 5319

Re: How to Redirect error to pipe not File, eg 2| not 2>

Hello Alan, sry, I had not noticed the access could be denied. Unfortunately I don't know a possibility to redirect the stdErr to stdIn. The pipe is only for stdOut to stdIn. So probably you have to merge stdOut and stdErr and find a way to separate it using key words and/or RegEx. @ECHO OFF CALL :R...