Skip to main content

All Questions

Tagged with
0 votes
2 answers
83 views

How to remove certain line numbers from a file and save the file using the inputfilename in batch

I'm trying to edit a txt file by removing certain line numbers from it. i would like to search for all files in the folder containing .txt, remove some lines and than save the file using the ...
Desz5's user avatar
  • 3
0 votes
1 answer
24 views

Batch - How to find strings from the first file in the second file and print which strings from the first file don't exist in the second one?

I have the first text file, example: amet sint perspiciatis minima And I have the second file full of text, example: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor ...
Peca21's user avatar
  • 9
0 votes
1 answer
180 views

How do I get some lines from TXT file with CMD (Only Windows Command Line)

I want to check the status of the USB scan device connected to the remote computer using the Windows command line, cmd.exe. (I only use Canon and Fijutsu brand scanners) The command I use: pnputil /...
Hakan DAŞTAN's user avatar
-1 votes
0 answers
187 views

batch script to find special characters in CSV file and remove leaving remaining text in field

Not looking for someone to provide a full script (unless someone wants to be kind enough to do so) looking to figure our or get some direction (after searching on the internet and not finding answers) ...
Midnite's user avatar
2 votes
1 answer
66 views

find number in file iterate and replace windows .bat

I need to create a windows .bat file that: finds HTTPPortNumber=#### in a file adds 1 to #### saves that HTTPPortNumber=NEWPORT to the file. Basically I am trying to increment the port number in a ...
Red Arlint's user avatar
-1 votes
1 answer
37 views

Get a certain string before the specified string and after the second specified string [BATCH] [closed]

I'm making a Batch script to get the actual stock of an product on a page, The JSON is : ... ,"src":"https://www.datocms-assets.com/34299/1615563408-h510-elite-white-black-fan-bracket-...
Dapkz's user avatar
  • 13
-2 votes
1 answer
41 views

Replace a string, in some conditions, in a file

I have file whose format like this: tcpport 1500 webports 1500,1500 tcpclientport 1500 I want to replace 1500 by 1510, only when I find the string webports. I found many scripts on searching and ...
Jopypy's user avatar
  • 1
-1 votes
1 answer
2k views

How to "grep" for a specific pattern in Windows text file and set it as a variable [closed]

I have a log file that gets downloaded every day that contains a list files on a Windows server. A portion of the filename changes every day. I'm trying to write either a batch script or powershell ...
Knightshift97's user avatar
1 vote
2 answers
383 views

Recursively search for folder whose name may contain space(s), in a specific directory

As said in Q-title, I am trying to find a particular directory called Local State, but it could be spelled by some Apps as LocalState or Local State, anyone of which is surely present in every Apps' ...
Vicky Dev's user avatar
  • 2,107
0 votes
1 answer
152 views

Windows batch for loop with find command does not work in a folder with a lot of files

I need to count the number of occurrences of a particular string in each file in a folder. Each line of a file can have only zero or one occurrence of this string. for %%g in (*) do Find /c "...
Yury's user avatar
  • 1
1 vote
2 answers
206 views

Is it possible to limit lines to search through in Type | Find operation

I need to iterate over multiple text files but exclude some based on name or content. What I have right now, searches through the entire file. This takes pretty long and is unnecessary. I want the (...
LTusche's user avatar
  • 11
-2 votes
1 answer
241 views

How to find folder when drive letter is unknown and folder path is random/unknown. using wmic logicaldisk get caption in Batch File?

Condition: I have 3 different folders. Folder1, Folder2 and Folder 3. They are placed within an unknown USB drive. Also the path is random. Sometimes it's: G:\Hello\Folder1 G:\Hello\Folder2 G:\hello\...
haseakash's user avatar
-1 votes
2 answers
66 views

In a Windows 10 batch file, is there a way to extract only the last total files count?

From a dir command that displays a number of sub-folders within a main folder, I am trying to extract the total number of files only. I am trying to use the FIND command with the string "File(s)&...
CoastalGuy's user avatar
1 vote
0 answers
46 views

How do I build a batch file that will copy the newest files for particular naming convention

I am stuck trying to build a batch file that will copy the newest files for particular naming conventions from a folder containing multiple naming conventions. For example the folder would contain the ...
MarkJB's user avatar
  • 11
0 votes
1 answer
50 views

Not getting the required output through "find" command in a for loop in Windows Batch Scripting

My requirement is simple, i just want to scan all the files in the current directory for a particular string and if that string is found i just want a display saying "String is found" ...
Ajesh's user avatar
  • 59

15 30 50 per page
1
2 3 4 5
15