Get every combination possible

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
AR Coding
Posts: 53
Joined: 02 May 2021 21:16

Get every combination possible

#1 Post by AR Coding » 26 Aug 2021 22:15

Is it possible to create a script that generates every combination of the typed characters possible?

For example:

Code: Select all

filename.bat 123
would give me all combinations:

Code: Select all

123
132
213
231
312
321
Or if i would use a switch that allows double digits
for example:

Code: Select all

filename.bat /d 123
Would give me:

Code: Select all

111
112
113
121
122
123
131
132
133
211
212
213
221
222
223
231
232
233
311
312
313
321
322
323
331
332
333

Aacini
Expert
Posts: 1885
Joined: 06 Dec 2011 22:15
Location: México City, México
Contact:

Re: Get every combination possible

#2 Post by Aacini » 27 Aug 2021 04:08

See this, or this, or this, or ...

Antonio

AR Coding
Posts: 53
Joined: 02 May 2021 21:16

Re: Get every combination possible & change cursor

#3 Post by AR Coding » 29 Aug 2021 17:39

Thanks, Aacini, thats what i was looking for.
2 questions:
can you use special characters in the permutation?

totally off topic: is it possible to change only the cursor color in a script?

Post Reply