Search found 1567 matches

by Ed Dyreen
24 Sep 2018 12:23
Forum: DOS Batch Forum
Topic: FOR loop does not increment /L %%parameter
Replies: 16
Views: 12875

Re: FOR loop does not increment /L %%parameter

floppydisks are also drivetype 2 so you are really searching for any removableDrives.
by Ed Dyreen
24 Sep 2018 07:10
Forum: DOS Batch Forum
Topic: copy partition script
Replies: 3
Views: 2247

Re: copy partition script

Thanks that looks good it does indeed support CLI, although since it is intended to run on windows server only the enterprise version can be installed. I will try Acronis Enterprise Server Disk Director first as it has become clear to me it also supports CLI and is probably the best software for scr...
by Ed Dyreen
24 Sep 2018 05:25
Forum: DOS Batch Forum
Topic: FOR loop does not increment /L %%parameter
Replies: 16
Views: 12875

Re: FOR loop does not increment /L %%parameter

Copy the code from my previous post, run it, it should give the same results I posted. From there you go along and figure out what you do that makes the code not working. If you do not know why, post the complete code. Not the code you have but testCode that we can actually work with. What I mean is...
by Ed Dyreen
23 Sep 2018 15:05
Forum: DOS Batch Forum
Topic: How to Use FC (File Compare) from the Windows Command Prompt
Replies: 4
Views: 5193

Re: How to Use FC (File Compare) from the Windows Command Prompt

I now have Windows Server 2003 Enterprise MSDN RTM Corporate Edition x86 SP0 en. and Windows Server 2003 Enterprise Edition VLK x86 SP0 en. I want to share some interesting facts that I figured out wayback but forgot about. The document talks about XP but this also applies to windows server 2003 ser...
by Ed Dyreen
23 Sep 2018 14:33
Forum: DOS Batch Forum
Topic: FOR loop does not increment /L %%parameter
Replies: 16
Views: 12875

Re: FOR loop does not increment /L %%parameter

@echo off Set "DeviceID[0]=XXXX XXXX" FOR /L %%i in (0,1,0) DO ( Echo %%i - Finally Iterates! Echo %DeviceID[0]% - Manual index placement, returns Device ID call Echo %%DeviceID[%%i]%% - Still empty. Set "DeviceID[0] call Set "DeviceID[%%i]=%%DeviceID[%%i] =%%" Set "DeviceID[0] ) pause 0 - Finally ...
by Ed Dyreen
23 Sep 2018 12:41
Forum: DOS Batch Forum
Topic: FOR loop does not increment /L %%parameter
Replies: 16
Views: 12875

Re: FOR loop does not increment /L %%parameter

Cmd assumes you mean %variable%%variable%, which results empty, thus you get Echo which will display ECHO is ... You want cmd to delay the expansion of the most outer variable. This can be done using call set a=b set bbb=3 call echo.%%b%a%b%% Or with delayed expansion setlocal enableDelayedExpansion...
by Ed Dyreen
23 Sep 2018 08:52
Forum: DOS Batch Forum
Topic: FOR loop does not increment /L %%parameter
Replies: 16
Views: 12875

Re: FOR loop does not increment /L %%parameter

Your for loop ends with goto :EOF thus telling to abort the for loop and leave the function. Similar as when you would write return inside a java program the function is exited immediately commands behind it will not be executed, loops aborted. You probably expect for x in ( set ) do ( commands ) &c...
by Ed Dyreen
23 Sep 2018 05:28
Forum: DOS Batch Forum
Topic: copy partition script
Replies: 3
Views: 2247

copy partition script

For years I've been using au3 scripts that would interface with PQMagic v8.1 to -resize a primary partition created by Windows Experience setup ( AutoPartition = 0 MsDosInitiated = 0 UnattendedInstall = Yes UnattendMode = FullUnattended Repartition = Yes Filesystem = ConvertNTFS ) to 10GB -copy part...
by Ed Dyreen
21 Sep 2018 16:05
Forum: DOS Batch Forum
Topic: Firewall Context Menu
Replies: 3
Views: 2061

Re: Firewall Context Menu

adding values to the registry using reg.exe can be done safely. 1) escape reg.exe's escape character "\" in data 2) escape double quotes in key and data 3) add enclosing quotes to key and data 4) delay special characters 5) delay special characters in quotes in key and data 6) add quote if uneven in...
by Ed Dyreen
21 Sep 2018 08:54
Forum: DOS Batch Forum
Topic: Batch file to copy and rename file with ipaddress.extension
Replies: 2
Views: 1659

Re: Batch file to copy and rename file with ipaddress.extension

Systems can have multiple ethernet cards and thus multiple IP addresses but usually only a single gateway. If you don't want to run the risk receiving an invalid IP or one that is not assigned a gateway and thus cannot be used to access the internet then you should filter gateway first && then IP.
by Ed Dyreen
19 Sep 2018 04:59
Forum: DOS Batch Forum
Topic: consolesoft.com is closing
Replies: 13
Views: 5968

Re: consolesoft.com is closing

@Ed Dyreen, @aGerman Because it uses a technique called "dll injection" that increment the possibilities of be detected as false positive. I think that signing it, this will be removed. Based on this notice, that in this case not apply to my program because is not malware. https://securityaffairs.c...
by Ed Dyreen
17 Sep 2018 18:53
Forum: DOS Batch Forum
Topic: consolesoft.com is closing
Replies: 13
Views: 5968

Re: consolesoft.com is closing

Many thanks siberia-man. In the future I would like to be able to sign the executables, although it is a bit expensive. Also publish a new version of bg that I have never published and it becomes a kind of internal command, but for this it is essential to be able to sign the executable. But in the ...
by Ed Dyreen
03 Sep 2018 17:31
Forum: DOS Batch Forum
Topic: Create a script to add a user to certain windows groups
Replies: 2
Views: 1383

Re: Create a script to add a user to certain windows groups

Not a fan of indention nor code tags then are u hu ? :D set "net=%windir%\System32\net.exe" This line concerns me, why are u doing that ? @echo off set "usr1_name=user1" set "usr1_g_admin=yes" set "usr1_g_user_rdesktop=yes" set "usr1_g_user_adv=no" set "usr1_g_users=no" :: Groups Windows set "allgro...
by Ed Dyreen
02 Sep 2018 17:35
Forum: DOS Batch Forum
Topic: find string in logs directory, send email
Replies: 4
Views: 1693

Re: find string in logs directory, send email

Thanks for posting the reply! This looks like I could work with this well. I should be able to create a log output file. I could use some help with the email function though and attach the created log in something like c:\temp\memory_log.txt . I added some comments and included an exemplary mail. b...
by Ed Dyreen
02 Sep 2018 04:42
Forum: DOS Batch Forum
Topic: Exist in /s "directory"doesn't work
Replies: 12
Views: 3803

Re: Exist in /s "directory"doesn't work

Thank you for your answer and solution. The problem with time it takes to finish, still persists though. Folder F2 has almost 300k pdf files in subdirs (~80GB). We should first filter the files with modified date of today and then start checking if they exist. If performance is important you made a...