Search found 250 matches

by goodywp
01 Mar 2024 08:58
Forum: DOS Batch Forum
Topic: How to read a txt file to sort out the string then output to a folder with some txt files
Replies: 9
Views: 881

Re: How to read a txt file to sort out the string then output to a folder with some txt files

Thanks again and just found another way to do so to replace the string having space with the same string no space to the source file before the above steps.
Thanks
by goodywp
28 Feb 2024 17:10
Forum: DOS Batch Forum
Topic: How to read a txt file to sort out the string then output to a folder with some txt files
Replies: 9
Views: 881

Re: How to read a txt file to sort out the string then output to a folder with some txt files

OK I see now.

I just had another issue when the fist line string has one space at the end. the folder will become 5 digits

Schemes_to_Sign_for_829501
the folder will be 29501.

Anyway to cut off the space before set it as folder?
by goodywp
27 Feb 2024 12:23
Forum: DOS Batch Forum
Topic: How to read a txt file to sort out the string then output to a folder with some txt files
Replies: 9
Views: 881

Re: How to read a txt file to sort out the string then output to a folder with some txt files

Thanks a lot! Antonio!
Yes works perfefectly!
Just a quick question for this line

Code: Select all

for /F "delims=\" %%a in ('findstr "_ ." source.txt') do (
So what is this 'findstr "_ ."?
the rest I can understand....

Thanks again!
Will
by goodywp
26 Feb 2024 13:02
Forum: DOS Batch Forum
Topic: How to read a txt file to sort out the string then output to a folder with some txt files
Replies: 9
Views: 881

Re: How to read a txt file to sort out the string then output to a txt file

It will create a folder name as 852046 under this folder there will be some files, in this cases, will be three files, one is T503-08667-0108.txt, T503-08667-0109.txt, and T503-08939-0102.txt This is contradictory. You are asking to create a folder but then you go on to say that several files alrea...
by goodywp
26 Feb 2024 10:53
Forum: DOS Batch Forum
Topic: How to read a txt file to sort out the string then output to a folder with some txt files
Replies: 9
Views: 881

How to read a txt file to sort out the string then output to a folder with some txt files

Hi all, I have a file as attached as below. The purpose is to make it automatically (programmatically) to be ready for the tools. Here is the original txt file as below: (let's name as source.txt) ------------------------------------------------------- Schemes_to_Sign_for_ 852046 Tetra terminal: Fro...
by goodywp
22 Feb 2024 12:37
Forum: DOS Batch Forum
Topic: How to get the next reboot time of Windows 10
Replies: 1
Views: 642

How to get the next reboot time of Windows 10

Hi guys,

Does anyone know by chance how we can get the next reboot time for Windows 10?
I can use this command to get the last reboot time as below:
systeminfo | find "Boot"

How about the next one?

Thanks
by goodywp
19 Dec 2023 10:41
Forum: DOS Batch Forum
Topic: if statement or if satement
Replies: 4
Views: 3937

Re: if statement or if satement

Thanks Batcher!
It is great!
by goodywp
18 Dec 2023 15:53
Forum: DOS Batch Forum
Topic: if statement or if satement
Replies: 4
Views: 3937

if statement or if satement

Hi all, I got a struggle of this two if statement while I try to add another condition on the previous code. Original code is as below: if defined RDL_TYPE_NAME ( call:UpCase RDL_TYPE_NAME IF NOT "!RDL_TYPE_NAME!"=="!RDL_TYPE_NAME:KIA=!" ( ECHO Skipping !RDL_TYPE_NAME! set RDL_TYPE_NAME= goto :endOf...
by goodywp
18 Dec 2023 15:50
Forum: DOS Batch Forum
Topic: where that space come from?
Replies: 3
Views: 4981

Re: where that space come from?

Thanks a lot!
by goodywp
14 Sep 2023 13:16
Forum: DOS Batch Forum
Topic: where that space come from?
Replies: 3
Views: 4981

Re: where that space come from?

sorry my bad, it was from
set sch_1=%~5
This one there was a space after %~5
by goodywp
14 Sep 2023 11:37
Forum: DOS Batch Forum
Topic: where that space come from?
Replies: 3
Views: 4981

where that space come from?

I have a task to copy some files from different subfolders as this below code. Basically based upon the files from subfolders to copy to one folder as below: @ECHO OFF set Base_Scripts=C:\CA_CONVERT set scheme_path="%Base_Scripts%\Tetra_Schemes" set profmaster=mockup del /F /Q %scheme_path%\%profmas...
by goodywp
07 Oct 2022 11:33
Forum: DOS Batch Forum
Topic: net use map SharePoint drive not working
Replies: 1
Views: 1498

net use map SharePoint drive not working

Hi All, I have a task to upload package to SharePoint I tried below scripts, but got System error 67 has occurred The network name cannot be found net use r: "https://xxx.xxxx.com/sites/xxxxx/xxxx/xxxx/document" password /user:domain\username /persistent:Yes What could go wrong here? The above error...
by goodywp
13 Sep 2022 13:39
Forum: DOS Batch Forum
Topic: why cd /d suddenly not working any longer in batch file
Replies: 10
Views: 4291

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

Thanks all! Your comments are correct. Someone temporary made a sub folder called su before this folder, ie. ..\su\T500B08951-0425_Lane7000_UPP_MOCKUP_00000 then this su folder removed in the process. As long as this variable su added in the end of the scripts as a variable input then re-run the scr...
by goodywp
23 Aug 2022 11:38
Forum: DOS Batch Forum
Topic: why cd /d suddenly not working any longer in batch file
Replies: 10
Views: 4291

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

Added suggested code to check got below results: build 23-Aug-2022 13:34:49 DIR F:\WKSP\CON2UPP\T500B08951-0425_Lane7000_UPP_MOCKUP_00000 build 23-Aug-2022 13:34:49 Volume in drive F is DATA build 23-Aug-2022 13:34:49 Volume Serial Number is 740C-448B build 23-Aug-2022 13:34:49 build 23-Aug-2022 13:...
by goodywp
23 Aug 2022 08:00
Forum: DOS Batch Forum
Topic: why cd /d suddenly not working any longer in batch file
Replies: 10
Views: 4291

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

Here is the log Curious: What did create the log? I'm asking because it indicates that you may run it somehow automated. Maybe from within a sheduled task. If this is the case and the task is running in a different account, it is very likely that network drives (like F:) are not mapped for this acc...