Search found 3801 matches

by aGerman
20 May 2010 16:43
Forum: DOS Batch Forum
Topic: User Input
Replies: 10
Views: 4256

Re: User Input

@aGerman That only made 2 lines... You have to "close" the last line of the code. That means place the cursor behind the last line and hit [ENTER]. The SETLOCAL command limits changings of the environment to the current batch window. It's not strictly recommented but it's one of my defaul...
by aGerman
20 May 2010 16:22
Forum: DOS Batch Forum
Topic: User Input
Replies: 10
Views: 4256

Re: User Input

> is for NEW >> is for APPEND @echo off &setlocal set /p "line1=1st line: " set /p "line2=2nd line: " set /p "line3=3rd line: " >test.txt echo.%line1% >>test.txt echo.%line2% >>test.txt echo.%line3% Regards aGerman
by aGerman
20 May 2010 16:01
Forum: DOS Batch Forum
Topic: User Input
Replies: 10
Views: 4256

Re: User Input

You need the command ECHO for outputting a variable value.

Code: Select all

echo %input%>>test.txt


Regards
aGerman
by aGerman
20 May 2010 11:42
Forum: DOS Batch Forum
Topic: Batch file to delete files over 10 days old
Replies: 4
Views: 3332

Re: Batch file to delete files over 10 days old

AFAIK you have to substitude @FILE by \"@FILE\" .

Regards
aGerman
by aGerman
20 May 2010 11:35
Forum: DOS Batch Forum
Topic: set /p timeout
Replies: 3
Views: 3421

Re: set /p timeout

SET /P stops your batch file and waits for input. There is no timeout.

Regards
aGerman
by aGerman
20 May 2010 11:19
Forum: DOS Batch Forum
Topic: Need help with variable substitutions and FOR loop
Replies: 5
Views: 3326

Re: Need help with variable substitutions and FOR loop

I can't try it because I don't have your tools. @echo off &setlocal FOR /R %%D in (.) DO CALL :recursive2 "%%D" GOTO :eof :recursive2 FOR %%F IN (%~1\*.tga) DO composite -compose Dst_over -tile pattern:checkerboard -size 10x10 "%%F" "%%~nF.png" montage *.png -backgr...
by aGerman
19 May 2010 16:31
Forum: DOS Batch Forum
Topic: Need help with variable substitutions and FOR loop
Replies: 5
Views: 3326

Re: Need help with variable substitutions and FOR loop

I see.
But it's 0:30 in Germany and I have to sleep some hours. Tomorrow I will try to understand your entire code. Think I can do some more for you.

Regards
aGerman
by aGerman
19 May 2010 16:20
Forum: DOS Batch Forum
Topic: Script to test 50+ FTP connections/image transfers to server
Replies: 2
Views: 3148

Re: Script to test 50+ FTP connections/image transfers to se

Have a look to http://www.dostips.com/DtTipsFtpBatchScript.php.
Think mput would help you to upload multiple files.

But I'm not sure if it would be possible to upload them to 50 different connections without calling 50 different batch files.

Regards
aGerman
by aGerman
19 May 2010 16:08
Forum: DOS Batch Forum
Topic: Help with long filenames in batch loop
Replies: 6
Views: 4979

Re: Help with long filenames in batch loop

I'm not familar with the syntax of zip, but using quots is the right way. try [EDIT You have to replace the standard delimiter by "nothing"] for /f "delims=" %%a in ('dir /a-d /b "weekly status update*.*"') do zip "%%~na.zip" "%%a" Regards aGerman
by aGerman
19 May 2010 16:01
Forum: DOS Batch Forum
Topic: Need help with variable substitutions and FOR loop
Replies: 5
Views: 3326

Re: Need help with variable substitutions and FOR loop

Lot of stuff. 1st) To substitude something inside a for loop You can't use the dynamic variables (like %%a). You have to use regular variables and the call trick. Eg. substitude a by b @echo off &setlocal for %%a in (a1 a2 a3 a4) do ( set "temp=%%a" call set "temp=%%temp:a=b%%&quo...
by aGerman
19 May 2010 15:33
Forum: DOS Batch Forum
Topic: FOR command assistance: Setting variable from command output
Replies: 7
Views: 4826

Re: FOR command assistance: Setting variable from command ou

Try this to figure out on which Win OS you work. AFAIK XP has version no. 5.x.x and Vista has 6.x.x So you could figure out if it is 5, higher or lower using the VER command. @echo off &setlocal for /f "delims=[. tokens=2" %%a in ('ver') do ( for /f "tokens=2" %%b in ("%...
by aGerman
18 May 2010 13:23
Forum: DOS Batch Forum
Topic: FOR command assistance: Setting variable from command output
Replies: 7
Views: 4826

Re: FOR command assistance: Setting variable from command ou

You can change registry keys using the REG ADD command. But I'm not familar with that internet stuff. I know that it should be something at HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Internet Settings but you have to assist me which keys / values have to be changed. BTW I'm not...
by aGerman
17 May 2010 16:10
Forum: DOS Batch Forum
Topic: FOR command assistance: Setting variable from command output
Replies: 7
Views: 4826

Re: FOR command assistance: Setting variable from command ou

I didn't test it, but try something like that: REM ##find the line beginning with "User-friendly Name:" and set the value behind the colon to %%B FOR /F "tokens=1* delims=:" %%A IN ('netsh int ip show interface^|findstr /b /i /c:"User-friendly Name:"') DO ( REM ##trim t...
by aGerman
16 May 2010 12:49
Forum: DOS Batch Forum
Topic: Batch ffmpeg auto convert
Replies: 14
Views: 10050

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: 1662

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