Search found 1910 matches

by penpen
16 Feb 2021 05:34
Forum: DOS Batch Forum
Topic: Problem with variable Drive setup for XP/W98SE
Replies: 17
Views: 4380

Re: Problem with variable Drive setup for XP/W98SE

@pieh-ejdsch(Phil) - Tried your script albeit within Vbox/Win98SE & the script did not work, all that was returned was a flashing cursor at the command prompt no temp were generated Tempdrv.bat file etc. I thought that should work pretty well, so i tested that script: On Win98SE (no matter if you a...
by penpen
15 Feb 2021 19:20
Forum: DOS Batch Forum
Topic: Why does this run net1.exe?
Replies: 15
Views: 2192

Re: Why does this run net1.exe?

The lower than ('<') is an undocumented wildcard, see: https://www.dostips.com/forum/viewtopic.php?t=6207 . On first look it seems as if that expression is able to match for characters not in filename after an '<'. Actually i don't remember those rules in detail, but i'm not sure that should be poss...
by penpen
15 Feb 2021 04:07
Forum: DOS Batch Forum
Topic: Find All Files with Same Filename But Different Extension
Replies: 11
Views: 3072

Re: Find All Files with Same Filename But Different Extension

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 exactly match. :( You could...
by penpen
10 Feb 2021 18:18
Forum: DOS Batch Forum
Topic: Problem with variable Drive setup for XP/W98SE
Replies: 17
Views: 4380

Re: Problem with variable Drive setup for XP/W98SE

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.
by penpen
10 Feb 2021 18:03
Forum: DOS Batch Forum
Topic: Find All Files with Same Filename But Different Extension
Replies: 11
Views: 3072

Re: Find All Files with Same Filename But Different Extension

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 'filename'? If you are within an appropriate for-loop (your variable %%F has to reference the full path) , then yes. Second is that if my list w...
by penpen
10 Feb 2021 07:15
Forum: DOS Batch Forum
Topic: URL's to .txt file
Replies: 2
Views: 1460

Re: URL's to .txt file

The following might help you:

Code: Select all

@echo off
setlocal enableExtensions enableDelayedExpansion
title Link's to txt file
REM for accent links
chcp 65001 > NUL
:LINK
set "url="
set /p url="URL: "
if not defined url goto :eof
>>"adress.txt" echo(!URL!
GOTO :LINK
penpen
by penpen
08 Feb 2021 20:00
Forum: DOS Batch Forum
Topic: Find All Files with Same Filename But Different Extension
Replies: 11
Views: 3072

Re: Find All Files with Same Filename But Different Extension

Your use a for/f-loop to traverse the lines (=filenames) of the sorted files and try to find out if the current variable is a pairing PDF-file, or another REC-file or unrelated files (in case you got unrelated PDF-files in that list). That means you need one (or more) environment variable, that refl...
by penpen
08 Feb 2021 04:05
Forum: DOS Batch Forum
Topic: Find All Files with Same Filename But Different Extension
Replies: 11
Views: 3072

Re: Find All Files with Same Filename But Different Extension

I have files (...) in various different directories (...) a .pdf extension counterpart somewhere on the drive (...) I know various ways to do this, but all are clunky (writing list to file and then searching every base filename through the whole drive or a list of all the files on the drive). I kno...
by penpen
07 Feb 2021 14:40
Forum: DOS Batch Forum
Topic: Batch file edit text file
Replies: 17
Views: 27936

Re: Batch file edit text file

@msswamy: You didn't react to the post of T3RRY, so i don't know whether you found it solved your issue or not.

penpen
by penpen
07 Feb 2021 13:11
Forum: DOS Batch Forum
Topic: Copy folder tree to any first level directory folder.
Replies: 1
Views: 1097

Re: Copy folder tree to any first level directory folder.

The command "xcopy" might help you; see its help for more.
by penpen
02 Feb 2021 07:59
Forum: DOS Batch Forum
Topic: Batch file edit text file
Replies: 17
Views: 27936

Re: Batch file edit text file

Could you provide a sample file, so i can see all the special characters (or is the exclamation mark ('!') the only one where the above fails); now that i think about it a leading colon character (':') in a line should also fail. Also some strings are impossible to replace using environment variable...
by penpen
27 Jan 2021 16:49
Forum: DOS Batch Forum
Topic: How to get rid of the extra character ahead of the title
Replies: 11
Views: 2871

Re: How to get rid of the extra character ahead of the title

Yes, my post was intended as a reaction to what Sqashman wrote.
Sorry, for confusing everyone.
by penpen
27 Jan 2021 14:52
Forum: DOS Batch Forum
Topic: How to get rid of the extra character ahead of the title
Replies: 11
Views: 2871

Re: How to get rid of the extra character ahead of the title

You could use the opening bracket:

Code: Select all

title(blah
But if it adds an extra space, then the initial title also had it (at least on my windows 10).


penpen
by penpen
26 Jan 2021 21:18
Forum: DOS Batch Forum
Topic: How does cmd.exe handle (or not handle) I/O errors?
Replies: 2
Views: 1179

Re: How does cmd.exe handle (or not handle) I/O errors?

Do you mean the following topic? https://www.dostips.com/forum/viewtopic.php?t=6881 Edit: You wrote on stackoverflow: when writes to stdout fail, there is no error message or error returned what-so-ever! But at least under windows 10 you could get some error message: Z:\>echo 1>&0 Das System kann ni...
by penpen
21 Jan 2021 17:20
Forum: DOS Batch Forum
Topic: JSON file in wrong format.
Replies: 3
Views: 1360

Re: JSON file in wrong format.

The following might help you:
- viewtopic.php?f=3&t=9049#p59302
- viewtopic.php?f=3&t=9049#p59297


penpen