Hi All - I am reaching out to see if there is a cleaner way to prepare a passed value for use in a for loop. For instance, I'm passing this value to a function : CALL :TEST "ACR_US Bank_Regions,AR_EFT" However, I need to iterate over both values, but space is considered a delimiter. So I am doing th...
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...
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...
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...
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" ^ --...
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" "...
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...
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 ...
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...
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 ...
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 %...