Search found 563 matches

by miskox
11 Jan 2024 10:18
Forum: DOS Batch Forum
Topic: Faster batch macros
Replies: 17
Views: 12087

Re: Faster batch macros

I didn't understand a thing Jeb wrote.

I tried to learn how to make/use macros. No luck. A 'macro for dummies' should be posted by someone who can do it.

Saso
by miskox
06 Jan 2024 13:26
Forum: DOS Batch Forum
Topic: to dir or not to dir
Replies: 1
Views: 4457

Re: to dir or not to dir

2B OR NOT 2B=FF

Saso
by miskox
21 Dec 2023 11:17
Forum: DOS Batch Forum
Topic: Why for loop wmic get processid return an extra invalid value?
Replies: 3
Views: 5211

Re: Why for loop wmic get processid return an extra invalid value?

Looks like wmic returns an extra empty line and this is what you get.

Saso
by miskox
30 Nov 2023 01:26
Forum: DOS Batch Forum
Topic: dism.exe isn't running.
Replies: 6
Views: 23715

Re: dism.exe isn't running.

Code: Select all

If "%Drive%"==C:
should be

Code: Select all

If "%Drive%"=="C:"
Maybe you could add /I to the IF statement.

Same goes for other IF statements.

Saso
by miskox
15 Nov 2023 06:23
Forum: DOS Batch Forum
Topic: [Solved] Move file to incremental subfolder based on file name prefix
Replies: 3
Views: 15552

Re: Move file to incremental subfolder based on file name prefix

Aacini's solutions are always so clever and short. I'm speechless.

Saso
by miskox
11 Nov 2023 09:35
Forum: DOS Batch Forum
Topic: ECHOing to a file without a trailing space
Replies: 6
Views: 21304

Re: ECHOing to a file without a trailing space

@jeb: your solution does not work. I have ( and ) in my data so I get

Code: Select all

34567891) was unexpected at this time.
@batcher: your solution:

Code: Select all

echo>file5.txt %field1%;%field2%;%field3%
works.

Thanks.
Saso
by miskox
10 Nov 2023 11:27
Forum: DOS Batch Forum
Topic: ECHOing to a file without a trailing space
Replies: 6
Views: 21304

ECHOing to a file without a trailing space

Hello all! @echo off set field1=a set field2=(a set field3=2 set field4=34564119 echo %field1%;%field2%;%field3%>file1.tmp echo %field1%;%field2%;%field3%>file2.tmp echo %field1%;%field2%;%field3% >file3.tmp echo (%field1%;%field2%;%field3%;%field4%)>file4.tmp Results: file1.tmp and file2.tmp are em...
by miskox
10 Nov 2023 11:11
Forum: DOS Batch Forum
Topic: space is added to the file if it is after the extension
Replies: 2
Views: 15414

space is added to the file if it is after the extension

See this:

Code: Select all

@echo off
set str=some text
echo %str%>tmp.tmp &REM space before the & sign!!!
result:

After the 'text' there is a space.

Code: Select all

some text 
Strange.

Saso
by miskox
03 Nov 2023 10:47
Forum: DOS Batch Forum
Topic: Is it worth learning Powershell?
Replies: 10
Views: 37293

Re: Is it worth learning Powershell?

I'm surprised you aren't using VBScript for that Easy answer: because I don't 'speak' VBScript. I must say that PS (ImportExcel cmd-let) does the job but I am always open for new (faster?) options. Update: did some searching: there are ome VBScripts. I only have to export *one* column to csv. Saso
by miskox
31 Oct 2023 10:13
Forum: DOS Batch Forum
Topic: Another amazing porting...
Replies: 14
Views: 91331

Re: Another amazing porting...

If you need this data in a file then makecab/expand solution might work for you. 1. Create a .cab file that contains your file. 2. Create a dump of this .cab file (for example with https://www.dostips.com/forum/viewtopic.php?p=14361#p14361) 3. And copy/paste the code in https://www.dostips.com/forum...
by miskox
29 Oct 2023 11:53
Forum: DOS Batch Forum
Topic: Another amazing porting...
Replies: 14
Views: 91331

Re: Another amazing porting...

@miskox I didn't understand what you wrote The data are 128 bytes and become 172 in coding based on 64. How much data you need to compress? Can makecab/expand be useful? Where are you going to store this compressed data? https://www.dostips.com/forum/viewtopic.php?p=14704#p14704 https://www.dostips...
by miskox
27 Oct 2023 08:27
Forum: DOS Batch Forum
Topic: Another amazing porting...
Replies: 14
Views: 91331

Re: Another amazing porting...

Amazing.

Regarding your compression: I can't help you but can't you use unzip.exe because you say you could use .exe file?

Saso
by miskox
24 Oct 2023 10:32
Forum: DOS Batch Forum
Topic: Is it worth learning Powershell?
Replies: 10
Views: 37293

Re: Is it worth learning Powershell?

I will just add this: I think PS is very good for (some?) admin repetive tasks (why I wrote 'some?'? - because I don't take care of servers but this is based on what I read so I don't have such experiences). I use PS almost daily for some special task: I have (my customer really) 150+ Excel files. A...
by miskox
18 Oct 2023 10:54
Forum: DOS Batch Forum
Topic: Replacing a locked file
Replies: 3
Views: 15217

Re: Replacing a locked file

Maybe you could add a

Code: Select all

timeout /T 10
before replacing the file so you have some time for the parent process to exit.

Saso