Search found 544 matches
- 04 May 2024 11:41
- Forum: DOS Batch Forum
- Topic: Mask password with Asterisk
- Replies: 16
- Views: 22797
Re: Mask password with Asterisk
Paste doesn't work on that piece of code either
- 03 May 2024 02:46
- Forum: DOS Batch Forum
- Topic: Mask password with Asterisk
- Replies: 16
- Views: 22797
Re: Mask password with Asterisk
Is there a way to paste a password into Antonio's solution instead of fully type it out?
- 03 May 2024 02:10
- Forum: DOS Batch Forum
- Topic: Mask password with Asterisk
- Replies: 16
- Views: 22797
Re: Mask password with Asterisk
Is there a way to paste a password into Antonio's solution instead of fully type it out?
- 08 Apr 2024 16:35
- Forum: DOS Batch Forum
- Topic: How to dynamically escape % symbols?
- Replies: 4
- Views: 658
Re: How to dynamically escape % symbols?
We have automation passwords that need to be encrypted for our financial applications. We have a password generator/randomizer that we use. When % symbols are present, we need to remember to always escape them, however, a lot of the folks forget to do that. Without further description of the involv...
- 04 Apr 2024 15:53
- Forum: DOS Batch Forum
- Topic: How to dynamically escape % symbols?
- Replies: 4
- Views: 658
How to dynamically escape % symbols?
Hi All - We have automation passwords that need to be encrypted for our financial applications. We have a password generator/randomizer that we use. When % symbols are present, we need to remember to always escape them, however, a lot of the folks forget to do that. Let's say I have a string : O*!)v...
- 05 Sep 2023 04:32
- Forum: DOS Batch Forum
- Topic: Safer way to parse curl output?
- Replies: 4
- Views: 22724
Re: Safer way to parse curl output?
Thank you so much, Aacini - this way is very slick!!! I'll use this. Thanks again! This is the way I would do it: @echo off setlocal set "CurlResp={"device_code":"f00b07aab09048268c78787c7f878787","user_code":"HFYRBFJF","verification_uri":"https://idcs-zzzzzzzzzzd.identity.cloud ... es_in":300}" rem...
- 29 Aug 2023 07:31
- Forum: DOS Batch Forum
- Topic: Safer way to parse curl output?
- Replies: 4
- Views: 22724
Safer way to parse curl output?
HI All - I have the following piece of code that is working as expected. FOR /F "tokens=2,4 delims=:," %%A IN (' curl --location --request POST "%IDCS_URL%/oauth2/v1/device" ^ --header "Content-Type: application/x-www-form-urlencoded;charset=utf-8" ^ --data-urlencode "response_type=device_code" ^ --...
- 10 Aug 2023 09:14
- Forum: DOS Batch Forum
- Topic: Trouble with ROBOCOPY - copy files to destination that don't already exist
- Replies: 2
- Views: 2034
Trouble with ROBOCOPY - copy files to destination that don't already exist
HI All - I have a few folders & contents (including subdirecotries) I need to copy from source to target. I need to do this frequently but what's happening is that it's copying everything each time I run the ROBOCOPY. I've tried to modiy it but having no luck. Here's what I have: ROBOCOPY "source" "...
- 21 Jul 2023 02:39
- Forum: DOS Batch Forum
- Topic: Clearing an array is done as a partial match? Why?
- Replies: 1
- Views: 1224
Clearing an array is done as a partial match? Why?
HI All - I have the following Array/List setup. The first position in the list is a filename mask. What's interesting is if I have 2 like file names but still unique, when I clear the array before each iteration, the other like array definition is cleared too. For instance, when running the below co...
- 28 May 2023 08:29
- Forum: DOS Batch Forum
- Topic: How to clear an array?
- Replies: 9
- Views: 5347
How to clear an array?
Hi Guys - This may be a silly question, but is there a way to clear an array without looping through and explicitly clearing each value? THis is what I'm doing now: REM Clear Array FOR /L %%A IN (1,1,100) DO ( SET "STR[DC%%~A].DLR=" SET "STR[DC%%~A].LOC=" SET "STR[DC%%~A].IMP=" ) I'm hoping there's ...
- 11 Feb 2022 10:34
- Forum: DOS Batch Forum
- Topic: How to spool batch script logic to create another batch script but not expanded?
- Replies: 5
- Views: 5522
Re: How to spool batch script logic to create another batch script but not expanded?
HI Squash & Team - Yes, you're right. I'm sorry. It was the last paren in the for loop causing the issue, I should have known. Final : SETLOCAL ENABLEDELAYEDEXPANSION SET "EXCLUSION_LIST=Automation_Parameters.ps1,Encrypt_Credentials.ps1,Download_Backup.ps1" SET "EXT=cmd" REM Read PS1 files from this...
- 06 Feb 2022 05:54
- Forum: DOS Batch Forum
- Topic: How to spool batch script logic to create another batch script but not expanded?
- Replies: 5
- Views: 5522
Re: How to spool batch script logic to create another batch script but not expanded?
THanks, Terry! That did the trick, but having one issue where when trying to redirect a for loop command, it's recognizing the DO. Here is my almost finished code: @ECHO OFF REM Read PS1 files from this directory PUSHD "..\PS1" FOR %%A IN ("*") DO ( REM Ensure cmd is purged before writing to it DEL ...
- 06 Feb 2022 05:19
- Forum: DOS Batch Forum
- Topic: How to spool batch script logic to create another batch script but not expanded?
- Replies: 5
- Views: 5522
How to spool batch script logic to create another batch script but not expanded?
Hi Guys - I have the following piece of code that I need to spool to another batch script. However, when I redirect, the functions/variables are done so expanded which isn't right. I need to pool this piece of code to "Testbatch.cmd": >>"..\Batch\TestBatch.cmd" ( @ECHO OFF SET "Script=%~n0" FOR /F %...
- 03 Jan 2022 04:34
- Forum: DOS Batch Forum
- Topic: How to arrange and array/list?
- Replies: 3
- Views: 3018
Re: How to arrange and array/list?
I suppose I was over thinking. I can force the order I need to process the files in based on my array definition. Here is what I came up with and it works, but not sure if this is considered "too clunky". I'm sure there are better ways? @echo off setlocal EnableDelayedExpansion SET "FILE_BIN=C:\TEMP...
- 03 Jan 2022 02:36
- Forum: DOS Batch Forum
- Topic: How to arrange and array/list?
- Replies: 3
- Views: 3018
Re: How to arrange and array/list?
Squash - Either my explanation wasn't good enough or you're still hitting the egg-nog. Dave's JSORT solution does not work for me in this situation. I'm not looking to sort file contents or files themselves. As stated, I'm using the 4th position in my array/list definition to dictate how I need to p...