Search found 203 matches

by goodywp
03 Dec 2020 12:56
Forum: DOS Batch Forum
Topic: The process cannot access the file because it is being used by another process
Replies: 2
Views: 754

Re: The process cannot access the file because it is being used by another process

Thanks Steffen! After I added ^ before the ) it works as expected! @echo off for /f "tokens=1-4 delims=, " %%A in (C:\Users\wyxy\Test\list2_UPP.txt) do call :indexlist "%%A" %%B %%C %%D EXIT /B %ERRORLEVEL% :indexlist set snfld=%~1 set snfld=%snfld:"=% set snfile=%~2 set snfileND=%snfile:~-3% set sn...
by goodywp
03 Dec 2020 11:05
Forum: DOS Batch Forum
Topic: The process cannot access the file because it is being used by another process
Replies: 2
Views: 754

The process cannot access the file because it is being used by another process

Hi all, I have a script to output the folders list and their underneath file version into a file called list.txt @echo off for /f "tokens=1-4 delims=, " %%A in (C:\Users\wyxy\Test\list2_UPP.txt) do call :indexlist "%%A" %%B %%C %%D EXIT /B %ERRORLEVEL% :indexlist set snfld=%~1 set snfld=%snfld:"=% s...
by goodywp
15 Nov 2020 09:22
Forum: DOS Batch Forum
Topic: how to pick up the duplicated files only from the greatest versions
Replies: 4
Views: 1043

Re: how to pick up the duplicated files only from the greatest versions

Thanks again Eureka! Yes worked as expected! Appreciated! Just a quick question to you. tasklist | sort (This will sort the list items in ascending order) This will give me the least version. tasklist | sort /R (This will sort the list items in descending order) This will give me the greatest versio...
by goodywp
14 Nov 2020 08:47
Forum: DOS Batch Forum
Topic: how to pick up the duplicated files only from the greatest versions
Replies: 4
Views: 1043

Re: how to pick up the duplicated files only from the greatest versions

Thanks Eureka! I tried it and is working but not the greatest version, the least version instead. The results is showing that all duplicated files have been removed but not the greatest version as expected. \T501-03568- 0100 \500298010103.S3S.mockup \T501-03568- 0100 \500299010103.S3S.mockup \T501-0...
by goodywp
13 Nov 2020 05:42
Forum: DOS Batch Forum
Topic: how to pick up the duplicated files only from the greatest versions
Replies: 4
Views: 1043

how to pick up the duplicated files only from the greatest versions

Hi all, I have a task to pickup the duplicated files only from the greatest versions as below From the BEFORE list, these two files, 500298010103.S3S.mockup , 500299010103.S3S.mockup occurred in the following versions folders, 0100 , 0101 , and 0102 ( I used italic to marked it out) BEFORE \T501-035...
by goodywp
09 Sep 2020 14:21
Forum: DOS Batch Forum
Topic: cmd line run and background run difference
Replies: 6
Views: 1885

Re: cmd line run and background run difference

Thanks Steffen! good suggestion and helpful!
by goodywp
21 Aug 2020 14:21
Forum: DOS Batch Forum
Topic: cmd line run and background run difference
Replies: 6
Views: 1885

Re: cmd line run and background run difference

Thanks Steffen!

This Bamboo plan run can be literally treated same as Windows scheduled task background run...

So far observed,there are some difference of running in cmd line and background run, for both some Batch scripts or some PowerShell scripts behavior...

Thanks again....
by goodywp
20 Aug 2020 15:27
Forum: DOS Batch Forum
Topic: cmd line run and background run difference
Replies: 6
Views: 1885

Re: cmd line run and background run difference

Hi Steffen, I implemented in bamboo plan which shall run in bamboo server. I think that it could be like scheduled task to run in Windows. On Bamboo it called inline scripts... I tested the script itself on bamboo server using cmd line it works. But when I run it from bamboo plan on browser it will ...
by goodywp
20 Aug 2020 07:50
Forum: DOS Batch Forum
Topic: cmd line run and background run difference
Replies: 6
Views: 1885

cmd line run and background run difference

Hi all, I had an experimental run between cmd line and background run. The cmd line run successfully. However, I found that the background run stopped at certain point not completed. I tried using start /wait cmd /c call, and meanwhile put exit at the end of that batch file in this case, remoteDownl...
by goodywp
04 Aug 2020 16:00
Forum: DOS Batch Forum
Topic: Old topic about xcopy
Replies: 8
Views: 2057

Re: Old topic about xcopy

@aGerman yes you are right. set source=\\casnprfil1\QADATA\QA_RELEASE\T500B09046-0200_Lane7000_TWM_MOCKUP_00000 set destination=D:\CA_CONVERT\New_pkg set opkg=T500B09046-0200_Lane7000_TWM_MOCKUP_00000 Robocopy /MIR "%source%" "%destination%\%opkg%" /E the above works but still complaining and gave m...
by goodywp
04 Aug 2020 15:23
Forum: DOS Batch Forum
Topic: Old topic about xcopy
Replies: 8
Views: 2057

Re: Old topic about xcopy

It is really dilemma.
The script itself run is OK. when it implemented on Bamboo server it is a dilemma..
when using mapped drive Y:/Mainfolder, it will complain Invalid drive specification
when using \\casnprfil1\root\Mainfolder, some files shall be missing not copied...
by goodywp
04 Aug 2020 12:27
Forum: DOS Batch Forum
Topic: Old topic about xcopy
Replies: 8
Views: 2057

Re: Old topic about xcopy

Thanks both bakemonogatari and aGerman!! The issue was about the mapping for the path, usually there is a root folder which will be mapped in Y: (that is Y:=\\casnprfil1\rootfolder). After corrected this issue, both working fine. However, there is another issue came out on the surface luckily caught...
by goodywp
25 Jul 2020 06:06
Forum: DOS Batch Forum
Topic: Old topic about xcopy
Replies: 8
Views: 2057

Re: Old topic about xcopy

@Squashman! Thanks for your reply. Here is the real one set source=\\casnprfil1\QADATA\QA_RELEASE\T500B09046-0200_Lane7000_TWM_MOCKUP_00000 set destination=D:\CA_CONVERT\New_pkg set opkg=T500B09046-0200_Lane7000_TWM_MOCKUP_00000 xcopy "%source%\*" "%destination%\%opkg%" /s /i on PC, set source=Y:\QA...
by goodywp
24 Jul 2020 18:56
Forum: DOS Batch Forum
Topic: Old topic about xcopy
Replies: 8
Views: 2057

Old topic about xcopy

Hi all, I had a xcopy issue as below: xcopy "source\folder\*" "destination\%folder%" /s /i Since the source is located in network drive and mapped to Y: I had two tries, one on my PC, another on server on PC, When used Y:\xxxx\folder , the above is working, but if using \\casnprfil1\xxxx\folder got ...
by goodywp
17 Oct 2019 14:45
Forum: DOS Batch Forum
Topic: Insert new line at certain line works but the lines starting with ; all gone, why?
Replies: 3
Views: 7745

Re: Insert new line at certain line works but the lines starting with ; all gone, why?

Thanks Eureka's help! SETLOCAL ENABLEDELAYEDEXPANSION set inputFile=Load_SDK.M71 set outputFile=Load_SDKtest.M71 set _strInsert=9993047045001700_LINGOT_WP_MKP.P3O set _strFind=9993047031002908_WP_WBService.P3P FOR /F "usebackq delims= eol=@" %%A IN ("%inputFile%") DO ( Echo %%A | Find "%_strFind%" &...