Search found 375 matches

by Samir
14 Feb 2021 11:13
Forum: DOS Batch Forum
Topic: Find All Files with Same Filename But Different Extension
Replies: 11
Views: 2818

Re: Find All Files with Same Filename But Different Extension

I started from scratch and took a completely different approach. The following worked to give me what I wanted: REM LIST OF ALL *.REC FILES ON DRIVE TO REC DIR \\192.168.1.10\ROOT\*.REC /S/B > \\192.168.1.10\ROOT\REC REM LIST OF ALL *.PDF FILES ON DRIVE TO PDF DIR \\192.168.1.10\ROOT\*.PDF /S/B > \\...
by Samir
12 Feb 2021 21:10
Forum: DOS Batch Forum
Topic: Find All Files with Same Filename But Different Extension
Replies: 11
Views: 2818

Re: Find All Files with Same Filename But Different Extension

I think you have a fundamental problem with your goal requirements - as currently stated, I believe you can have ambiguous situations. Given files abc.rec and abc1.pdf, your rules state that those should be a pair. But then what happens if later on abc1.rec is added? You could argue the pdf can be ...
by Samir
12 Feb 2021 14:01
Forum: DOS Batch Forum
Topic: Find All Files with Same Filename But Different Extension
Replies: 11
Views: 2818

Re: Find All Files with Same Filename But Different Extension

When I run the following command using the first line in the RECBAS.TXT file, the command works fine: FINDSTR /C:brn_91b3be_015016 D:\PDF The results are expected: \\192.168.1.10\ROOT\SPROOT\INCOMING\brn_91b3be_015016_recovered.pdf Anyone have an idea why the file in /G in my previous post isn't bei...
by Samir
11 Feb 2021 14:55
Forum: DOS Batch Forum
Topic: Playing a .wav file in the background
Replies: 4
Views: 1825

Re: Playing a .wav file in the background

At one point back in the day when I had some free passes to COMDEX in Atlanta right at around the time Win95 was released, myself and 2x friends unleashed a script at the Microsoft booth that after 30 minutes would play the 'start me up' song and then change the boot image to windows F***ing 95 and ...
by Samir
11 Feb 2021 14:45
Forum: DOS Batch Forum
Topic: Problem with variable Drive setup for XP/W98SE
Replies: 17
Views: 4007

Re: Problem with variable Drive setup for XP/W98SE

I remembered another way to get the current drive and path--and it was simple and I used to use it so much back in the day

Code: Select all

CD
Without any options it will simply display the present working drive with full path.
by Samir
11 Feb 2021 14:35
Forum: DOS Batch Forum
Topic: Find All Files with Same Filename But Different Extension
Replies: 11
Views: 2818

Re: Find All Files with Same Filename But Different Extension

Thank you again penpen. And as I worked through your suggestions, I realized another detail I missed in my initial analysis--the PDF files will contain the REC filename, but may also have other stuff appended, so now even if I can take each path and parse out the file name, the file names won't exac...
by Samir
10 Feb 2021 18:42
Forum: DOS Batch Forum
Topic: Problem with variable Drive setup for XP/W98SE
Replies: 17
Views: 4007

Re: Problem with variable Drive setup for XP/W98SE

penpen wrote:
10 Feb 2021 18:18
Samir wrote:I can't recall if this worked this way in 95/98/ME
The command extension "%~d0"-syntax exclusively works for "cmd.exe" and doesn't work under "command.com", so it won't work under Win9x.
Thank you for the correction penpen! There were certainly more limits back in the day, that's for sure.
by Samir
10 Feb 2021 15:21
Forum: DOS Batch Forum
Topic: Find All Files with Same Filename But Different Extension
Replies: 11
Views: 2818

Re: Find All Files with Same Filename But Different Extension

Thank you very much penpen. The more I started delving into the specifics, I realized I had some mistaken assumptions in my original data. First, is that my list of file ending in .REC will have the full path. Can I use %~nxF to get just the file name from the full path read into the variable 'filen...
by Samir
10 Feb 2021 11:19
Forum: DOS Batch Forum
Topic: Problem with variable Drive setup for XP/W98SE
Replies: 17
Views: 4007

Re: Problem with variable Drive setup for XP/W98SE

Someone correct me if I'm wrong, but you can use %~d0 to get the drive letter the batch is currently being run from. I can't recall if this worked this way in 95/98/ME, but I don't think it worked this way in DOS 6.0 and earlier. So in your batch this line ECHO PROMPT $N:>T2.BAT ($N: is a Prompt for...
by Samir
08 Feb 2021 11:53
Forum: DOS Batch Forum
Topic: Find All Files with Same Filename But Different Extension
Replies: 11
Views: 2818

Re: Find All Files with Same Filename But Different Extension

Thank you penpen. How would I search the sorted filenames for pairs in successive lines? I can't think of what that test would look like logically. Thank you again for the help!
by Samir
08 Feb 2021 02:16
Forum: DOS Batch Forum
Topic: Search broken
Replies: 4
Views: 2015

Re: Search broken

Whew I thought it was just me. I got a post error too, but it seems the db is fixed now. Will post back if I see any more issues.
by Samir
08 Feb 2021 02:11
Forum: DOS Batch Forum
Topic: Find All Files with Same Filename But Different Extension
Replies: 11
Views: 2818

Find All Files with Same Filename But Different Extension

I have files like this on a drive in various different directories: brn008077cf04db_014868.REC brn001ba9ca5166_015479.REC brn008077cf04db_015727.REC brn008077cf04db_015767.REC brn008077cf04db_015982.REC brn008077cf04db_016928.REC brn008077cf04db_016600.REC brn008077cf04db_016679.REC brn008077cf04db_...
by Samir
08 Feb 2021 01:43
Forum: DOS Batch Forum
Topic: store nth line of file in variable
Replies: 11
Views: 8242

Re: store nth line of file in variable

Me too! I forgot about this post and now forgot even what I was trying to do. :cry:

If I remember (if I didn't already solve it using some other method), I'll definitely post back.
by Samir
15 Aug 2020 19:46
Forum: DOS Batch Forum
Topic: store nth line of file in variable
Replies: 11
Views: 8242

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...
by Samir
14 Jul 2020 12:15
Forum: DOS Batch Forum
Topic: Ducky Scripts and Batch Files?
Replies: 0
Views: 2460

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?