Search found 189 matches

by goodywp
31 Oct 2017 07:57
Forum: DOS Batch Forum
Topic: how to delete files of within folders with same name as files based upon a list of files
Replies: 4
Views: 1220

how to delete files of within folders with same name as files based upon a list of files

I had two tasks as below: .../app/ (under this folder, there are hundreds of files, some are matching the files listed in applist.txt) .../comp/ (under this folder there are hundreds of subfolders, their names are exactly same as file names under this subfolders, some subfolders are matching the nam...
by goodywp
20 Oct 2017 08:20
Forum: DOS Batch Forum
Topic: how to close these separate cmd windows after they are done
Replies: 3
Views: 1009

Re: how to close these separate cmd windows after they are done

Thanks so much for both Squashman and Antonio for you simple and clear advice!

I made the change based upon your suggestion and clean up the code and works perfectly!

I also like Antonio's code for more beauty....

:D
by goodywp
19 Oct 2017 14:57
Forum: DOS Batch Forum
Topic: how to close these separate cmd windows after they are done
Replies: 3
Views: 1009

how to close these separate cmd windows after they are done

I have a code like this below: @echo off cd C:\auto_pkg_build\Scripts\scheme_replace\pkg_data\temp if exist data1.txt ( start cmd /k call C:\auto_pkg_build\Scripts\scheme_replace\echo_data1.cmd ) cd C:\auto_pkg_build\Scripts\scheme_replace\pkg_data\temp if exist data2.txt ( start cmd /k call C:\auto...
by goodywp
18 Oct 2017 08:17
Forum: DOS Batch Forum
Topic: remove string between \****\abcdefghijklm
Replies: 2
Views: 984

Re: remove string between \****\abcdefghijklm

Thanks ShadowThief!!
by goodywp
17 Oct 2017 11:49
Forum: DOS Batch Forum
Topic: remove string between \****\abcdefghijklm
Replies: 2
Views: 984

remove string between \****\abcdefghijklm

Hi all I have a task like below: input: \T501-08680-0101-T3_Mockup_Generic_Scheme_Pack\T501-08680-0101\Application_Signing\Signed_Schemes\MockupSigned_T3\500007011000.S3S” output: \T501-08680-0101\Application_Signing\Signed_Schemes\MockupSigned_T3\500007011000.S3S” Basically I would like to trim off...
by goodywp
16 Oct 2017 11:36
Forum: DOS Batch Forum
Topic: to use the search criteria in Criteria.txt to search the files listed in Files.txt
Replies: 9
Views: 2540

Re: to use the search criteria in Criteria.txt to search the files listed in Files.txt

Thank all for all the replies.

Squashman, the one I used is just want to simplified question. Since the real one is a dynamic txt file based upon the var14.

Steffen, thank you always for your constructive suggestion which make the code simple and beauty... :D
by goodywp
13 Oct 2017 08:59
Forum: DOS Batch Forum
Topic: to use the search criteria in Criteria.txt to search the files listed in Files.txt
Replies: 9
Views: 2540

Re: to use the search criteria in Criteria.txt to search the files listed in Files.txt

I added the code to generate this txt file:

Code: Select all

setlocal enabledelayedexpansion

set VAR14=%VAR14: =%

for /f "delims=" %%i in (schemeslist%VAR14%.txt) do (

    set line=%%i C:\auto_pkg_build\Tools\PACKAGER\S3S\temp

    echo !line:~47, 16! >>%VAR14%.txt


Thanks
by goodywp
13 Oct 2017 06:39
Forum: DOS Batch Forum
Topic: to use the search criteria in Criteria.txt to search the files listed in Files.txt
Replies: 9
Views: 2540

Re: to use the search criteria in Criteria.txt to search the files listed in Files.txt

Thanks so much!!! I checked it again as you pointed out. The source files for both string.txt and list.txt. There is one space at the end of each line. These was due to the previous step generated these files. So that means I have to add one more step to process the files before it can be used... On...
by goodywp
12 Oct 2017 15:50
Forum: DOS Batch Forum
Topic: to use the search criteria in Criteria.txt to search the files listed in Files.txt
Replies: 9
Views: 2540

to use the search criteria in Criteria.txt to search the files listed in Files.txt

I have a two text files 1) string.txt 500007011000.S3S 500008011000.S3S 500022010300.S3S 2) list.txt “C:\TEST\T501-08680-0102\Application_Signing\Signed_Schemes\MockupSigned_T3\500006011000.S3S” “C:\TEST\T501-08680-0102\Application_Signing\Signed_Schemes\MockupSigned_T3\500007011000.S3S” “C:\TEST\T5...
by goodywp
12 Oct 2017 07:29
Forum: DOS Batch Forum
Topic: remove duplicate string in txt file
Replies: 6
Views: 1776

Re: remove duplicate string in txt file

Thanks Antonio! I should focus on one requirement.... :oops:
by goodywp
11 Oct 2017 12:29
Forum: DOS Batch Forum
Topic: remove duplicate string in txt file
Replies: 6
Views: 1776

Re: remove duplicate string in txt file

Hi Antonio,

Is it possible always to have the output as this order

T501-08680-0102 T501-08699-0100 0501-08690-0100

instead of
T501-08680-0102 0501-08690-0100 T501-08699-0100

Thanks
by goodywp
11 Oct 2017 09:33
Forum: DOS Batch Forum
Topic: remove duplicate string in txt file
Replies: 6
Views: 1776

Re: remove duplicate string in txt file

Excellent!!! Antonio!
Thanks both you and Squashman! :D
by goodywp
11 Oct 2017 08:48
Forum: DOS Batch Forum
Topic: remove duplicate string in txt file
Replies: 6
Views: 1776

remove duplicate string in txt file

I have a task to remove the duplicate string as below input: T501-08680-0102 0501-08690-0100 T501-08680-0102 T501-08699-0100 I would like to have output like this: the second line T501-08680_0102 is duplicate one should be removed output: T501-08680-0102 0501-08690-0100 T501-08699-0100 I tried this ...
by goodywp
13 Sep 2017 07:38
Forum: DOS Batch Forum
Topic: Search all the items listed in a file against all versions of sub folders till found
Replies: 3
Views: 1573

Re: Search all the items listed in a file against all versions of sub folders till found

Thanks Phil, I did not get the time to try yet but thanks for your suggestion!!