Posts by user3486019 • 313 points
9 posts
-
1
votes1
answer686
viewsA: Batch to locate a subfolder, move all files to a level above and delete the folder
Solved with the following code: @echo off & setlocal enabledelayedexpansion for /d /r %~dp0 %%a in (*) do ( if /i "%%~nxa"=="FolderX" ( set "folderpath=%%a" ( move /y !folderpath!\*…
-
1
votes1
answer686
viewsQ: Batch to locate a subfolder, move all files to a level above and delete the folder
I have this structure: .. ..\FolderA\FolderX\File1.txt ..\FolderB\FolderX\File2.txt ..\FolderC\FolderD\FolderE\FolderX\File3.txt I need a batch to locate all "Folderx" folders in the subdirectories…
-
-1
votes1
answer2099
viewsQ: How to remove the "extract here" submenu option from a sfx (exe)?
There is how to remove the "extract here" option from a sfx (.exe) file created with Winrar? Note: The option "extract here" is presented in the submenu, by right clicking under the file. Any other…
-
-1
votes2
answers123
viewsQ: Handle missing variables in array
How to mount the following array if one of the variables is not defined? $a = 1; $b = 2; $d = 4; $array = array($a, $b, $c, $d); The values of the variables ($a, $b, $c and $d) come from a server…
-
5
votes2
answers5665
viewsQ: Check duplicate values in the array
My question is this:: I have the following array: $array = array(10, 30, 10, 40, 40); I would like to know if there is a simple way to display the message: "there are duplicate values" or "there are…
-
0
votes1
answer88
viewsQ: Doubt in the comparison of variables
There is another way to develop this comparison? $numero = 1234; $a = 1111; $b = 2222; $c = 3333; $d = 4444; if ($numero == $a or $numero == $b or $numero == $c or $numero == $d) { echo "O número…
-
3
votes1
answer1535
viewsQ: Locate the next "less than" value in an array
I have the following array and need to locate the next smallest value that defined in $valor: $seq = array(500, 490, 430, 370, 350, 240, 100, 90); $n_seq = count($seq); $valor = 400; // ASSUME…
-
4
votes1
answer565
viewsQ: Find in an array the next value greater than a predefined value
I have the following array with forech set: $getdepth = '{"result":"true","asks":[[20,13],[34,20],[30,8],[35,8],[4,40],"bids":[["18",22],["16",74],["70",99],["65",18],["1",15]]}'; $depth =…
-
3
votes1
answer1217
viewsQ: Transfer keys and values from a JSON to PHP variables
How to transfer data from a JSON:…