Search found 1007 matches

by abc0502
05 Sep 2013 14:44
Forum: DOS Batch Forum
Topic: Parallel Batch with loop back to Parent
Replies: 6
Views: 6252

Re: Parallel Batch with loop back to Parent

Hi , It can be done but it will depend on what the last daily.bat file will do. Let's say it will create a log file called "log3.log" After it finish it's work, so you code your main batch to check for that file if it has been created or not, if it was it continue, else it sleep for a whil...
by abc0502
12 May 2013 05:32
Forum: DOS Batch Forum
Topic: For Command not Reading Spaces in Words
Replies: 2
Views: 3772

Re: For Command not Reading Spaces in Words

Note the double quotes
call :ch "%caller%"


Always put your variables between double quotes, whether it has spaces or not, that will save you some troubles.

BTW, !k has it between double quotes in his original code
by abc0502
10 May 2013 06:04
Forum: DOS Batch Forum
Topic: nested mess
Replies: 2
Views: 3603

Re: nested mess

I agree with Endoro
You have an else statement without it's if statement
And another one you didn't close
by abc0502
07 May 2013 08:29
Forum: DOS Batch Forum
Topic: Xcopy several times
Replies: 3
Views: 4330

Re: Xcopy several times

First SET All Your Directories ( from ) and ( to )in variables & SET the total number of the directories like this: SET "Max=3" // Max Directory Number SET "DIR1=C:\Test 1" // source Dir number 1 SET "DIR2=D:\Test 2" // source Dir number 2 SET "DIR3=E:\Test 3&q...
by abc0502
05 May 2013 15:22
Forum: DOS Batch Forum
Topic: renaming extensions on files with underscores
Replies: 3
Views: 5404

Re: renaming extensions on files with underscores

Your code is right but you made a big mistake, you told the DIR command to process Directories not Files for /f "tokens=* delims= " %%a in ('dir /b /ad /s') do rename "%%a\*.AG" "*.back" But For More Simple Code & As Endoro Said, try this @Echo OFF For /F "deli...
by abc0502
05 May 2013 06:48
Forum: DOS Batch Forum
Topic: Downloading and installing critical and important updates
Replies: 5
Views: 5858

Re: Downloading and installing critical and important update

why you do that, the windows should has this feature ?
beside, i have no idea how to find the update or how to know that it is important or not, maybe some one else knows something.
by abc0502
05 May 2013 06:34
Forum: DOS Batch Forum
Topic: HLP BEGGED!
Replies: 14
Views: 12225

Re: HLP BEGGED!

wow, so close now.thanx, hang in there! issue still with SET "DirName=!FName:~0,-4!" is assuming %1 will always be 4 chars, what about say -disk1, which is 6? hence my routine that counted chars parsed. Oh!, now I see what you mean. This is easy to fix. Replace SET "DirName=!FName:~0...
by abc0502
04 May 2013 06:23
Forum: DOS Batch Forum
Topic: HLP BEGGED!
Replies: 14
Views: 12225

Re: HLP BEGGED!

Try This batch, it should be used like this: Clean.bat "-disk1" "20" The "-disk1" : is the part of the file, like "-cd1" etc... The "20" : is the number of the parts that exist and has the same name part, the default is 10, so if there is more than 1...
by abc0502
03 May 2013 03:17
Forum: DOS Batch Forum
Topic: Convert batch script into an executable or higher language
Replies: 31
Views: 25409

Re: Convert batch script into an executable or higher langua

If you want the file to hold setting, it doesn't matter what kind of file it is, it could be ini, ext. exe, or even without extensions. The batch file just read what inside and take that as an input and work based on it. So name it .ini, .exe, .txt any thing, just make sure you can extract inputs fr...
by abc0502
03 May 2013 03:13
Forum: DOS Batch Forum
Topic: HLP BEGGED!
Replies: 14
Views: 12225

Re: HLP BEGGED!

Ok, so it's not just 2 parts it could be many. the one i made is just processing 2 parts. But could there be a missing parts like 1,2 and 4 ( no 3 )? Note: it couldn't take input from you becasue i forgot to change the variable in line 5 to: SET "InFilePartName=%~1" try it again and it wil...
by abc0502
03 May 2013 03:07
Forum: DOS Batch Forum
Topic: Downloading and installing critical and important updates
Replies: 5
Views: 5858

Re: Downloading and installing critical and important update

Do you mean windows update? I think windows has this feature. (windows 7)
by abc0502
02 May 2013 08:29
Forum: DOS Batch Forum
Topic: Batch to rename all .avi and .srt files in order.
Replies: 12
Views: 11356

Re: Batch to rename all .avi and .srt files in order.

it's might be different, but if you can post a sample of each different naming method, we could find something common in all of then and is used to sort and rename. BTW, if foxidrive code works with you, you can change my code a little and make it then rename srt with the same name. Only after Foxid...
by abc0502
02 May 2013 08:16
Forum: DOS Batch Forum
Topic: Batch to rename all .avi and .srt files in order.
Replies: 12
Views: 11356

Re: Batch to rename all .avi and .srt files in order.

are you sure the srt files has this format " 04x01.srt" and your avi "S04E01"?
I tested it on some files with the same format, i used the names you posted and it worked.
by abc0502
02 May 2013 08:09
Forum: DOS Batch Forum
Topic: Batch to rename all .avi and .srt files in order.
Replies: 12
Views: 11356

Re: Batch to rename all .avi and .srt files in order.

Strange ? :?:
did you put it in the same folder with your avi and srt files :?: ?
by abc0502
02 May 2013 07:54
Forum: DOS Batch Forum
Topic: Batch to rename all .avi and .srt files in order.
Replies: 12
Views: 11356

Re: Batch to rename all .avi and .srt files in order.

Test This, not sure about it, so make sure to check the content of each srt file to see if it match or not. Test on 3 files first @Echo OFF SETLOCAL EnableDelayedExpansion For /F "delims=" %%A In (' DIR /B /A:-D "*.avi" ') Do ( SET "CurrFileName=%%~nA" For /F "toke...