5
submitted 6 days ago* (last edited 6 days ago) by ohshit604@sh.itjust.works to c/shortcuts@lemmy.world

Essentially the folder structure is as such:

└── Jobs/
    ├── 33000-33099/
    │   └── 33024/
    │       └── Job-Contents
    │   └── 33046/
    │       └── Job-Contents
    │   └── 33083/
    │       └── Job-Contents
    ├── 33100-33199/
    │   └── 33174/
    │       └── Job-Contents
    └── 33200-33299/
        └── 33274/
            └── Job-Contents

On desktop we use a batch script to quickly search jobs however, I’m starting to make use of our companies iPads (since no one else does) to perform my tasks, I tried making up a script with shortcuts to search these directories for the job but it doesn’t seem to work with a wildcard sub-directory.

Any ideas are appreciated, I can’t install Scribtable on this iPad as the COO hasn’t fully set them up and it’s asking for a password for any installations.

Edit; the Batch script we use, hopefully explains it better than I did.

@echo off
cls

setlocal enableextensions enabledelayedexpansion

:UserInput
set /p UserInput=Enter job number: 

REM Validate the input

REM Check if the input has exactly 5 characters
if not "!UserInput:~5!"=="" (
    echo Please enter a 5-digit number.
    color 0E
    goto UserInput
)

REM Check if the input contains only numeric characters
for /F "delims=0123456789" %%a in ("!UserInput!") do (
    echo Please enter a 5-digit number.
    color 0E
    goto UserInput
)

REM Check if the folder exists - Update 2025-07-24 Clears shell and text colour remains white after repeat.
set "Folder=N:\Drawings\Jobs\!UserInput:~0,3!00-!UserInput:~0,3!99\!UserInput!-*"
if not exist "!Folder!" (
    echo Job folder does not exist.
    color 0C
    timeout /t 2 >nul
    cls
    color 0F
    goto UserInput
)

REM Rest of the script - Update 2025-07-24 Script no longer automatially closes, instead repeats from the start. Also clears shell and text colour remains white after repeat.

for /D %%a in ("!Folder!") do (
    %SystemRoot%\explorer.exe "%%~a"
    echo Job folder found successfully.
    color 0A
    timeout /t 2 >nul
    cls
    color 0F
    goto UserInput
)

:end
you are viewing a single comment's thread
view the rest of the comments
[-] ohshit604@sh.itjust.works 1 points 6 days ago* (last edited 6 days ago)

If I could use grep I would! IOS/iPadOS scripting is plug-n-play, no shell involved.

Image as an example:

[-] j4k3@lemmy.world 2 points 6 days ago

Condolences on your neo feudalism. /s

GL

this post was submitted on 03 Sep 2025
5 points (100.0% liked)

Shortcuts

1853 readers
1 users here now

Community dedicated to Apple Shortcuts.

founded 2 years ago
MODERATORS