Search found 43 matches

by kwsiebert
21 May 2024 08:35
Forum: DOS Batch Forum
Topic: Why does "(title Test) & pause" change the window title to "Test - pause" and not to "Test"?
Replies: 3
Views: 9307

Re: Why does "(title Test) & pause" change the window title to "Test - pause" and not to "Test"?

It has nothing to do with the title command. The currently executing command is always added to the window title, until it completes, and the pause command is running until you press a key. You can see this by opening a fresh command prompt and executing the pause command by itself.
by kwsiebert
08 May 2023 09:32
Forum: DOS Batch Forum
Topic: Notepad bug
Replies: 10
Views: 15277

Re: Notepad bug

Notepad in Windows 7 behaves this way as well, which I almost didn't expect, since I know there were changes between Windows 7 and 10 (regarding how Notepad handles Unix text files, in particular). Windows 7 Notepad does allow you to select the encoding when you open a file. Note also that if you cr...
by kwsiebert
17 Feb 2023 11:32
Forum: DOS Batch Forum
Topic: extract .7z subdirectories into the same folder of bat file
Replies: 5
Views: 6001

Re: extract .7z subdirectories into the same folder of bat file

That almost sounds like you entered it on the command line, rather than running the batch file. It's going to behave differently in each case. Alternately, did you accidentally type a third %? This is not the place for help with the 7zip application, but check what the command line switches being us...
by kwsiebert
23 Aug 2021 09:11
Forum: DOS Batch Forum
Topic: How to download only today files from ftp using batch script?
Replies: 2
Views: 3379

Re: How to download only today files from ftp using batch script?

If the files have a date stamp in their name, you can have your batch file determine the date and use it as part of your mget line. If they don't, you'll have to connect once and output the results of a dir command to a text file, and then parse the dates from that file to create a list of files and...
by kwsiebert
12 Aug 2021 09:04
Forum: DOS Batch Forum
Topic: Spaces folder names in FOR loop
Replies: 3
Views: 4026

Re: Spaces folder names in FOR loop

Turn echo on, or replace the del command with echo, to see what exactly is different between the lines that work and the ones that don't. That should give a clue as to what needs to be changed.
by kwsiebert
09 Aug 2021 10:19
Forum: DOS Batch Forum
Topic: CMD Sorting Syntax? [SOLVED]
Replies: 5
Views: 4749

Re: CMD Sorting Syntax?

I suggest adopting a file naming syntax that uses leading zeroes to pad all numbers to the same digit count. You probably also want to sort the file list before doing anything where you care about file order, even that Type command at the end. Newer versions of Windows Explorer do a smart sort on nu...
by kwsiebert
07 Jul 2021 12:03
Forum: DOS Batch Forum
Topic: File Conversion
Replies: 8
Views: 6908

Re: File Conversion

EDIT: It won't be pretty, but I'm going to individualize the loops & continue labels to each conversion. I *think* that's where the current problem lies. Yes, I'm fairly certain your problem comes from having multiple identical labels. There are several ways to make it more elegant, but before opti...
by kwsiebert
06 Jul 2021 14:45
Forum: DOS Batch Forum
Topic: File Conversion
Replies: 8
Views: 6908

Re: File Conversion

I changed the 'goto end' on the mp4 to go back to check for wmv and the goto on the wmv to go back to the file check in case there are multiple files to convert. And does it still appear to hang the computer with this fix? I was going to place a 'start /wait' instead of 'start "" for each conversio...
by kwsiebert
06 Jul 2021 09:49
Forum: DOS Batch Forum
Topic: File Conversion
Replies: 8
Views: 6908

Re: File Conversion

If a .wmv file exists in the workdir, your code is potentially looping back on itself and checking for .wmv files again. I'd expect the .wmv files to have been moved to the Processed directory, so this doesn't happen more than once... unless they are still locked by the conversion program. There are...
by kwsiebert
28 Jun 2021 09:33
Forum: DOS Batch Forum
Topic: Why does this run net1.exe?
Replies: 15
Views: 18955

Re: Why does this run net1.exe?

... executing "C:\Windows\notepad.exe", you get that different icon. I just tried that, and it sure does. That's so weird, especially since it's a hardlink, effectively pointing to the SAME file! >fsutil hardlink list C:\windows\notepad.exe \Windows\notepad.exe \Windows\System32\notepad.exe \Window...
by kwsiebert
11 Jan 2021 09:43
Forum: DOS Batch Forum
Topic: Is there a way to make a bootable batch file?
Replies: 5
Views: 6956

Re: Is there a way to make a bootable batch file?

I'm not sure if this is still possible with Windows 10, but in earlier versions you could change the 'shell' program, the main one that was launched as the GUI. By default, it's explorer.exe, but you could change it to cmd.exe to only get a command line, or to any specific program/batch file of your...
by kwsiebert
13 Jul 2020 09:15
Forum: DOS Batch Forum
Topic: Figuring out which computer is being used at two different locations
Replies: 12
Views: 11107

Re: Figuring out which computer is being used at two different locations

You said there's no network connection, but there's still almost assuredly a network adapter present, right? In that case, you should be able to get the MAC address, which will still be unique.
by kwsiebert
17 Jul 2019 09:17
Forum: DOS Batch Forum
Topic: Strange Issue with FOR LOOP; ignoring last record?
Replies: 3
Views: 6692

Re: Strange Issue with FOR LOOP; ignoring last record?

I didn't try running it, but it looks like it's only testing and outputting the value from the previous loop. LAST is getting set to C-12528180 only at the very end, and then the loop is done, there are no more tests to check if it should be output. You need one more instance of your output statemen...
by kwsiebert
12 Jul 2019 08:54
Forum: DOS Batch Forum
Topic: Calling a bat file with a parameter
Replies: 3
Views: 7461

Re: Calling a bat file with a parameter

That batch file doesn't appear to be making use of using any command line parameters. If I'm reading this right, you seem to be expecting the command line parameter to get piped into the set /p, but that's not how it works.
by kwsiebert
01 May 2019 16:51
Forum: DOS Batch Forum
Topic: Get Parent Directory as a variable
Replies: 6
Views: 13990

Re: Get Parent Directory as a variable

Is the code you posted part of a larger block enclosed in parentheses? If so, you need to use delayed expansion and use !a! instead of %a%.