Search found 345 matches

by Samir
07 Jun 2019 21:09
Forum: DOS Batch Forum
Topic: Batch script that count all occurrences of a particular string
Replies: 1
Views: 1571

Re: Batch script that count all occurrences of a particular string

Ummm...the find command itself can do that--find /?
by Samir
06 Jun 2019 20:48
Forum: DOS Batch Forum
Topic: Copying Single Source to Multiple Destinations in Parallel
Replies: 4
Views: 1735

Re: Copying Single Source to Multiple Destinations in Parallel

I changed line 5 Call: nextcopy ... (comes from when you write from the phone.) Of course it makes no sense to send the data over the network several times. Maybe a batch can be started from the server / network in order not to resend the data from the client. To start with a trigger for automatic ...
by Samir
06 Jun 2019 09:15
Forum: DOS Batch Forum
Topic: Copying Single Source to Multiple Destinations in Parallel
Replies: 4
Views: 1735

Re: Copying Single Source to Multiple Destinations in Parallel

That is an interesting idea, although the code is going to take me some time to understand.

The only issue I see is with bandwidth. If by having two simultaneous copies running the bandwidth for each copy gets halved, the net speed will still end up being the same.
by Samir
05 Jun 2019 22:33
Forum: DOS Batch Forum
Topic: Copying Single Source to Multiple Destinations in Parallel
Replies: 4
Views: 1735

Copying Single Source to Multiple Destinations in Parallel

Most of us that have worked with computers have run into this problem in some form or another--you have one source and it needs to be copied to multiple destinations. And the normal solution is to run these copy operations serially, ie one at a time, so the execution time is N*NumberOfDestinations. ...
by Samir
27 Mar 2018 04:12
Forum: DOS Batch Forum
Topic: Renaming Files
Replies: 6
Views: 1723

Re: Renaming Files

So a couple of questions to clarify some things.

If a file is without an extension, you want it to start with "zz"?

If the file has a .txt, extension, it should be the same name as the mp3, except with a txt extension, correct?
by Samir
17 Mar 2018 18:40
Forum: DOS Batch Forum
Topic: Clean text
Replies: 11
Views: 2210

Re: Clean text

Compo wrote:
17 Mar 2018 17:22
Samir, look at the post right above yours :!:
Yeah, I'm sure that will solve the OP's issue--I just couldn't wrap my head around exactly what was going on there. :oops:
by Samir
17 Mar 2018 16:48
Forum: DOS Batch Forum
Topic: Branched Operate Based on Variable First Letter
Replies: 2
Views: 989

Re: Branched Operate Based on Variable First Letter

I'm unsure if i understand your task right: @echo off setlocal enableExtensions disableDelayedExpansion CALL :FUNCTION "VARIABLE" CALL :FUNCTION "ALMOND" CALL :FUNCTION "ARYA" CALL :FUNCTION "CHEVA" CALL :FUNCTION "SATYA" CALL :FUNCTION "P" goto :eof :FUNCTION if /I "%~1" lss "p" goto :oneThing if ...
by Samir
17 Mar 2018 15:55
Forum: DOS Batch Forum
Topic: Clean text
Replies: 11
Views: 2210

Re: Clean text

sorry it's not a dir command, but "7za l file.zip" I'll check your solution thank you for help! Ahh makes sense. And I just checked the options for 7za and it doestn' seem to have any options for the display. I have some ideas on how to do this since the column width seems always the same, but I'll...
by Samir
17 Mar 2018 15:36
Forum: DOS Batch Forum
Topic: timed batch file execution
Replies: 11
Views: 3421

Re: timed batch file execution

I think you are all missing the intended request. The user said they wanted a batch file to start a particular time of the day. They are not asking to pause execution of a batch file until a specified time of the day. Hmmm...but if the main loop of the batch file won't start until the specified tim...
by Samir
17 Mar 2018 00:06
Forum: DOS Batch Forum
Topic: Branched Operate Based on Variable First Letter
Replies: 2
Views: 989

Branched Operate Based on Variable First Letter

I have a batch in which a variable with have a directory name. That directory name will start with a letter and vary in length, but usually within the old dos 8.3 limits. For example, variable name could be one of the following: ALMOND ARYA CHEVA SATYA What I would like to do is if the first letter ...
by Samir
16 Mar 2018 23:22
Forum: DOS Batch Forum
Topic: Clean text
Replies: 11
Views: 2210

Re: Clean text

This looks like you're just trying to get the filenames from a directory listing. And judging by the \ character, it's a dos/windows system. So instead of using just dir, you can use dir /b. For finding all the filenames in not only the current directory but also subdirectories, the for command is a...
by Samir
16 Mar 2018 23:10
Forum: DOS Batch Forum
Topic: Possible to Use Label Name as a Variable?
Replies: 1
Views: 615

Re: Possible to Use Label Name as a Variable?

So in reading another thread here, I ran across an example that used %~1 with call, which inspired me to try %~0 with call. Indeed, it will return the label used. My testing batch: ECHO OFF CALL :MAIN "TEST" GOTO END :MAIN ECHO START ECHO %~0 SET LABEL=%~0 SET LABEL=%LABEL:~1% ECHO %LABEL% ECHO %~1 ...
by Samir
16 Mar 2018 22:50
Forum: DOS Batch Forum
Topic: timed batch file execution
Replies: 11
Views: 3421

Re: timed batch file execution

A little late to the party, but I use this in several batches. It doesn't require anything external except the ping command. It starts the batch at 1am.

Code: Select all

:START
PING -n 60 127.0.0.1 > NUL
SET CURTIME=%TIME:~0,-6%
IF NOT "%CURTIME%"==" 1:00" GOTO START
by Samir
16 Mar 2018 22:48
Forum: DOS Batch Forum
Topic: Possible to Use Label Name as a Variable?
Replies: 1
Views: 615

Possible to Use Label Name as a Variable?

I have a batch file that will call to various functions where the label name is also used in the function. For example (ALMOND in this example): :ALMOND XCOPY \\SHARENAME\ALMOND \ALMOND /F/R/E/S/H/K/Y/D/C/L GOTO :EOF I wanted to know if there's any variable like %0 for the label in a batch file. Tha...
by Samir
19 Dec 2017 22:07
Forum: DOS Batch Forum
Topic: DOSTIPS.COM does not work on XP
Replies: 15
Views: 4643

Re: DOSTIPS.COM does not work on XP

I'm running xp as well. Using chrome portable 26 (I think) and it's working fine. phpbb is a very established forum software and has worked over several operating system incarnations (I started using this version of phpbb as a user when I was on win98), and I don't see any reason for them to update ...