Search found 250 matches

by goodywp
28 Oct 2021 11:41
Forum: DOS Batch Forum
Topic: how to solve insert line with <abc>
Replies: 6
Views: 4495

Re: how to solve insert line with <abc>

Third time today I have answered this problem on different Internet forums. It should be quite obvious to you that the > is used for redirecting standard output. So that is essentially a special character. The same goes for < character. It represents standard input. So you need to escape those char...
by goodywp
28 Oct 2021 09:36
Forum: DOS Batch Forum
Topic: how to solve insert line with <abc>
Replies: 6
Views: 4495

how to solve insert line with <abc>

Hi all, I search up that there are some scripts to do the insert job after certain line or certain string. However, if the insert string contain <abcdef> it can not do the insert any more, complain the The syntax of the command is incorrect. How we can solve this problem. For example, I have a xml f...
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: 2976

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

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

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

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

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

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

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

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

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

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

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

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

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...