Search found 250 matches

by goodywp
23 Aug 2022 07:38
Forum: DOS Batch Forum
Topic: why cd /d suddenly not working any longer in batch file
Replies: 10
Views: 4292

Re: why cd /d suddenly not working any longer in batch file

Here is the part of code ping -n 15 127.0.0.1 >NUL echo %CD% current directory echo %NEW_PACKAGE_BASE_PATH%\%NEW_PACKAGE_NAME% cd /d %NEW_PACKAGE_BASE_PATH%\%NEW_PACKAGE_NAME% ::pushd %NEW_PACKAGE_BASE_PATH%\%NEW_PACKAGE_NAME% echo 286 echo %CD% again to see the directory Here is the log build 23-Au...
by goodywp
22 Aug 2022 11:49
Forum: DOS Batch Forum
Topic: why cd /d suddenly not working any longer in batch file
Replies: 10
Views: 4292

why cd /d suddenly not working any longer in batch file

Hi All, Our company recently implement a lot of security measures. One of the noticed issue is that I need add timeout /t n to make the scripts working. Otherwise it shall complain as below: The process cannot access the file because it is being used by another process. Now I had another issue as be...
by goodywp
22 Aug 2022 11:40
Forum: DOS Batch Forum
Topic: How to get rid of The file cannot be copied onto itself.
Replies: 3
Views: 4598

Re: How to get rid of The file cannot be copied onto itself.

Thanks I will take Stick a 2>nul at the end of the line to hide the errors
by goodywp
12 Aug 2022 07:53
Forum: DOS Batch Forum
Topic: how to get rid of this error even the scripts works as expected
Replies: 2
Views: 1988

how to get rid of this error even the scripts works as expected

Hi All, I have below scripts to delete folders old than 15 days. forfiles /p "C:\CATA_AUTO\Report_Archive\Master\CHC" /s /D -15 /C "cmd /c IF @isdir == TRUE rd /S /Q @path" It works and did the deletion but I also got these errors as below: ERROR: The system cannot find the file specified. ERROR: Th...
by goodywp
09 Jun 2022 13:05
Forum: DOS Batch Forum
Topic: How to get rid of The file cannot be copied onto itself.
Replies: 3
Views: 4598

How to get rid of The file cannot be copied onto itself.

Hi ALl, I have a below code to copy all subfolders files to one newly made subfolder. folder/ /Sub1 /sub2 /sub3 ....... /subfolder for /r "folder" %%d in (*) do copy "%%d" "folder\subfolder" It works fine except in the middle having these lines The file cannot be copied onto itself. 0 file(s) copied...
by goodywp
04 Jun 2022 11:41
Forum: DOS Batch Forum
Topic: How to handle pop or manual input in an existing batch less touch the original scripts file
Replies: 6
Views: 4384

Re: How to handle pop or manual input in an existing batch less touch the original scripts file

The main scripts attached. Also this script used a configure file called Factory.cfg (we can ignore the Customer.cfg) What I need is to do below steps: 1) I need get rid of pop up (run command line only) 2) First need variable for com. 3) Have option 3 to do Clear Terminal, need get rid of "Enter" ...
by goodywp
03 Jun 2022 11:41
Forum: DOS Batch Forum
Topic: How to handle pop or manual input in an existing batch less touch the original scripts file
Replies: 6
Views: 4384

Re: How to handle pop or manual input in an existing batch less touch the original scripts file

The main scripts attached. Also this script used a configure file called Factory.cfg (we can ignore the Customer.cfg) What I need is to do below steps: 1) I need get rid of pop up (run command line only) 2) First need variable for com. 3) Have option 3 to do Clear Terminal, need get rid of "Enter" m...
by goodywp
01 Jun 2022 13:31
Forum: DOS Batch Forum
Topic: How to handle pop or manual input in an existing batch less touch the original scripts file
Replies: 6
Views: 4384

How to handle pop or manual input in an existing batch less touch the original scripts file

Hi all, I have a complex scripts to do installation job. This scripts is mainly for manually run so that you can provide value for it or select the option to do then hit the enter to continue the job. Now my question is if I want to run in command line without interactive response, in other words it...
by goodywp
04 May 2022 14:47
Forum: DOS Batch Forum
Topic: How to get the second last folder if the last folder not contain the desired file yet
Replies: 2
Views: 3417

Re: How to get the second last folder if the last folder not contain the desired file yet

Thanks Steffen!!! It is quick and simple just by sorting newest first! plus checking zip file. Yes it works for sure for the first case. 1) When the zip file not in the last folder then search up in the second last... 2) When the zip file is there but not finished yet, still in generating (since nor...
by goodywp
03 May 2022 10:23
Forum: DOS Batch Forum
Topic: How to get the second last folder if the last folder not contain the desired file yet
Replies: 2
Views: 3417

How to get the second last folder if the last folder not contain the desired file yet

Hello All, I have a below script to do the job to scan the latest folder which should contain the wanted file from build. Since it is a runtime, now the issue is sometimes the last (latest) folder created but somehow the wanted file not generated yet or this build (folder) only for something else......
by goodywp
29 Apr 2022 08:07
Forum: DOS Batch Forum
Topic: Scripts to get hour not always correct
Replies: 4
Views: 5709

Re: Scripts to get hour not always correct

The first thing you need to understand is that %TIME% is locale, PC, and user configurable and may not therefore return a string in the format you require for splitting, and even if it is, that may not be returned as a 24 hour clock string. There are many ways of retrieving the time in a consistent...
by goodywp
14 Apr 2022 11:54
Forum: DOS Batch Forum
Topic: how to echo out this list after the adb command
Replies: 1
Views: 3072

Re: how to echo out this list after the adb command

Sorry I just found out it should use below to get output

Code: Select all

adb devices -l >>devicename.txt
and works
by goodywp
14 Apr 2022 11:42
Forum: DOS Batch Forum
Topic: how to echo out this list after the adb command
Replies: 1
Views: 3072

how to echo out this list after the adb command

Hi All, In Android project, adb is a much intensively used command. Now I have this command as below adb devices -l Output is a list as below List of devices attached 20ACCD801803 device product:DX8000 model:DX8000 device:DX8000 transport_id:1 2158CD823377 device product:DX8000 model:DX8000 device:D...