Search found 3315 matches

by aGerman
16 Jan 2019 16:28
Forum: DOS Batch Forum
Topic: searching log files
Replies: 2
Views: 64

Re: searching log files

joejames_786 wrote:
15 Jan 2019 06:40
XX BACKUP = 200
What is the 200 for? The number lines found in the log file that begin with XX BACKUP?
What does "columns" mean? Are XX and BACKUP separated by a various number of spaces or always by the same number?

Steffen
by aGerman
16 Jan 2019 16:21
Forum: DOS Batch Forum
Topic: Foldername first letter of filename
Replies: 3
Views: 30

Re: Foldername first letter of filename

STEPHAN wrote:
16 Jan 2019 13:10
I have the filename in %1
All you need is assigning it to a regular environment variable. Then use the substring syntax as described in the help of the SET command.

Code: Select all

set "initial=%~1"
set "initial=%initial:~0,1%"
Steffen
by aGerman
14 Jan 2019 16:41
Forum: DOS Batch Forum
Topic: Help changing icons
Replies: 9
Views: 75

Re: Help changing icons

Okay. So if you have this file on your desktop and it is a valid ICO file then it should already show up with the pictogram that your shortcut shall get later on. If you don't see the pictogram then the file may have extension .ICO but isn't a valid icon file. Another validation is the magic number....
by aGerman
14 Jan 2019 14:30
Forum: DOS Batch Forum
Topic: Help changing icons
Replies: 9
Views: 75

Re: Help changing icons

Sorry but I have no idea what I did wrong with my explanation. I really thought I was clear enough.
mwarren wrote:
11 Jan 2019 14:29
"C:\Users\Michael Warren\Desktop\CUREMD.ICO"
Does this file exist? If it does not exist then you're out of luck.
by aGerman
14 Jan 2019 14:23
Forum: DOS Batch Forum
Topic: Help changing icons
Replies: 9
Views: 75

Re: Help changing icons

As I already said CUREMD.ICO must exist on your desktop. Icon pictograms are not included in shortcuts. The shortcut only links an .ICO file (or an icon that exists as resource in executable files or library files). Once CUREMD.ICO doesn't exist in the specified path anymore, also the shortcut doesn...
by aGerman
14 Jan 2019 10:32
Forum: DOS Batch Forum
Topic: Help changing icons
Replies: 9
Views: 75

Re: Help changing icons

I believe you but yet I can't help out as long as I'm not even able to reproduce the failure.

Steffen
by aGerman
13 Jan 2019 05:40
Forum: DOS Batch Forum
Topic: Batch file help. Needing to position windows.
Replies: 15
Views: 214

Re: Batch file help. Needing to position windows.

It's basically the VBScript code found there: https://www.dostips.com/forum/viewtopic.php?t=4285 … but translated to JScript. I hoped I would have been able to use the XCountChars and YCountChars members of the Win32_ProcessStartup class to run the CMD process with the window size already adjusted. ...
by aGerman
11 Jan 2019 18:39
Forum: DOS Batch Forum
Topic: Batch file help. Needing to position windows.
Replies: 15
Views: 214

Re: Batch file help. Needing to position windows.

Try if something like this hybrid script works for you @if (@a)==(@b) @end /* @echo off &setlocal set "start=cscript //nologo //e:jscript %~fs0 " :: columns lines target left top %start% "cmd /s /q /d /k ^"^"mode con cols=60 lines=20 ^& ping 172.217.17.142 -t ^"^"" 0 0 %start% "cmd /s /q /d /k ^"^"m...
by aGerman
11 Jan 2019 16:45
Forum: DOS Batch Forum
Topic: Help changing icons
Replies: 9
Views: 75

Re: Help changing icons

Works for me as soon as the path specified for IconLocation points to an existing .ICO file.

Steffen
by aGerman
11 Jan 2019 16:31
Forum: DOS Batch Forum
Topic: Batch file help. Needing to position windows.
Replies: 15
Views: 214

Re: Batch file help. Needing to position windows.

Window.exe is a tool that you'll find if you follow the link Aacini provided. It's in the .ZIP file you can download in the linked thread, and it's already the compiled program that you can use instantly. No need to create it new every time you need it.

Steffen
by aGerman
11 Jan 2019 13:04
Forum: DOS Batch Forum
Topic: Batch file help. Needing to position windows.
Replies: 15
Views: 214

Re: Batch file help. Needing to position windows.

Like that: start cmd /k "Window GPos 100 50 & ping xxx.xxx.yyy.xxx -t" Where Window.exe should be in the same directory along with your batch script (otherwise you have to define the path, too). The 100 is an example for the distance from the left edge, and 50 for the distance from the top edge of y...
by aGerman
10 Jan 2019 15:52
Forum: DOS Batch Forum
Topic: The system was unable to find the specified registry key or value
Replies: 4
Views: 57

Re: The system was unable to find the specified registry key or value

As I expected the value name is only PastIconsStream. So what's the reason for the =- in your code?

Code: Select all

reg delete "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify" /v "PastIconsStream" /f
Steffen
by aGerman
10 Jan 2019 11:16
Forum: DOS Batch Forum
Topic: FOR LOOP Question - Delimiters
Replies: 2
Views: 84

Re: FOR LOOP Question - Delimiters

There is no foolproof method to process csv data in batch. Try something like that: @echo off &setlocal set "file=test.csv" setlocal EnableDelayedExpansion <"!file!" ( for /f %%i in ('type "!file!"^|find /c /v ""') do for /l %%j in (1 1 %%i) do ( set "line=" &set /p "line=" if defined line ( set "li...
by aGerman
10 Jan 2019 10:48
Forum: DOS Batch Forum
Topic: The system was unable to find the specified registry key or value
Replies: 4
Views: 57

Re: The system was unable to find the specified registry key or value

Right now I created that value and tried to delete it using your line. It perfectly works for me. But the value name PastIconsStream=- seems to be weird. Are you sure the =- belong to the name or isn't it rather only PastIconsStream?

Steffen
by aGerman
07 Jan 2019 13:59
Forum: DOS Batch Forum
Topic: save playlist as unicode or ?
Replies: 7
Views: 123

Re: save playlist as unicode or ?

Why is explorer using a different codepage ? Now i see the wrong character 'Ú' displayed in the console, why ? Rather knock on Microsoft's door to ask these questions. I guess it's for historical reasons (coming from DOS) that console applications use an OEM codepage while Windows applications use ...