Search found 362 matches
- 15 Aug 2020 19:46
- Forum: DOS Batch Forum
- Topic: store nth line of file in variable
- Replies: 10
- Views: 6240
Re: store nth line of file in variable
I hate to bump an older thread, but this is exactly what I needed to store a line of html into a variable from a file but it doesn't seem to work. :cry: I'm sure it has to do with the fact that html has all those wonderful < and > that will drive batch batty, but this is my challenge. Any assistance...
- 14 Jul 2020 12:15
- Forum: DOS Batch Forum
- Topic: Ducky Scripts and Batch Files?
- Replies: 0
- Views: 1345
Ducky Scripts and Batch Files?
I just found out about the Ducky Script 'language' as well as the dongle that started it all. I'm surprised there's not been a discussion here on how something like this can be used to quickly create a batch file and execute it on multiple systems by just the insertion of a usb device. Thoughts?
- 02 Jun 2020 01:32
- Forum: DOS Batch Forum
- Topic: Self Updating Continuously Running Batch
- Replies: 7
- Views: 2291
Re: Self Updating Continuously Running Batch
So I have to admit that my simplistic batch skills made it quite a task just to understand the solutions presented. And even after digesting them, going back to my very simple idea of just copying to a temp and then re-copying and re-executing to make a loop seemed to be the easiest way. Final code ...
- 30 May 2020 02:38
- Forum: DOS Batch Forum
- Topic: Copy files do not overwrite existing
- Replies: 11
- Views: 16717
Re: Copy files do not overwrite existing
I forgot exactly what I used, but will post it once I remember again. I'll also get the os version as I think that's a factor. 

- 25 May 2020 22:21
- Forum: DOS Batch Forum
- Topic: Copy files do not overwrite existing
- Replies: 11
- Views: 16717
Re: Copy files do not overwrite existing
Thank you penpen.
Did you try a solution with wildcards and see if the echo n works? That's where it seemed to break down for me.

- 24 May 2020 17:22
- Forum: DOS Batch Forum
- Topic: Copy files do not overwrite existing
- Replies: 11
- Views: 16717
Re: Copy files do not overwrite existing
Old topic, but I thought I would post. pipe an 'n' to each question on the overwrite. the /-y is required in batch files or it assumes /y. echo n|copy /-y c:\source\* c:\destination\* This works great for copy, but does not for xcopy. :( Anyone have a solution for xcopy? I have a xcopy /d that keep...
- 23 May 2020 14:25
- Forum: DOS Batch Forum
- Topic: Self Updating Continuously Running Batch
- Replies: 7
- Views: 2291
Re: Self Updating Continuously Running Batch
Thank you! Another idea to digest.
It always amazes me how much you guys know about batch--I'm always in awe. 


- 23 May 2020 13:11
- Forum: DOS Batch Forum
- Topic: Self Updating Continuously Running Batch
- Replies: 7
- Views: 2291
Re: Self Updating Continuously Running Batch
Thank you both for your fantastic responses! It is amazing the depth and breath of responses one gets here. 8) Simply fantastic. 8) You both have made me sit down and think again how I want to approach the task I wish the batch to accomplish. Once I have digested everything, I will post what I come ...
- 23 May 2020 02:01
- Forum: DOS Batch Forum
- Topic: Self Updating Continuously Running Batch
- Replies: 7
- Views: 2291
Re: Self Updating Continuously Running Batch
So after thinking about this for a bit it seems like this might be the best way: if the batch started is the original, copy the file to %temp% and execute it there. at the end of the batch, copy the file from the original to %temp% again if orig is newer and execute the %temp% copy again. This will ...
- 22 May 2020 18:06
- Forum: DOS Batch Forum
- Topic: Self Updating Continuously Running Batch
- Replies: 7
- Views: 2291
Self Updating Continuously Running Batch
I'm sure some of you have one of these running, but I'm having trouble figuring out the best way to implement the 'updating' method. I have a batch that I execute that loops back it its beginning again when complete so it can run again. Now the problem is that if this batch is running and I update i...
- 22 May 2020 17:41
- Forum: DOS Batch Forum
- Topic: Survey Popup - RESULTS
- Replies: 4
- Views: 21427
Re: Survey Popup - RESULTS
Since for years (decades?) this forum has only had one forum--DOS Batch--why not simply add forums for Powershell and Bash and see what happens? If there isn't enough activity you can always hide/delete them. 

- 22 May 2020 17:37
- Forum: DOS Batch Forum
- Topic: transpose input file lines to columns w/ separator
- Replies: 1
- Views: 1109
Re: transpose input file lines to columns w/ separator
Thank you for sharing. I remember a long time ago there was a bath for something similar if not the exact same thing, but who knows how to find it. 

- 22 May 2020 17:23
- Forum: DOS Batch Forum
- Topic: Depicus wake on lan batch file question
- Replies: 3
- Views: 1985
Re: Depicus wake on lan batch file question
For older versions of windows that do not have timeout as a command, but do have a tcp/ip stack installed, I use the following for a timer:where SECONDS is the number of seconds you want to pause.
Code: Select all
ping -n SECONDS 127.0.0.1 > NUL
- 19 May 2020 15:07
- Forum: DOS Batch Forum
- Topic: pktmon.exe
- Replies: 7
- Views: 2066
Re: pktmon.exe
That's a bit misleading. You can snoop on traffic, but you can't inherently do anything with it. It's like Wireshark. But in the article, the author was able to get ftp passwords sent in the clear. Not all traffic on a lan is encrypted so I can easily see this being used by a malware toolkit to scr...
- 19 May 2020 15:05
- Forum: DOS Batch Forum
- Topic: pktmon.exe
- Replies: 7
- Views: 2066
Re: pktmon.exe
That's a bit misleading. You can snoop on traffic, but you can't inherently do anything with it. It's like Wireshark. But in the article, the author was able to get ftp passwords sent in the clear. Not all traffic on a lan is encrypted so I can easily see this being used by a malware toolkit to scr...