Started programming a little while ago, and wanted to do a simple program that can sort through images via user input. I wanted to do this via cmd/powershell because I assume it'd be the faster way to do it and it's easier than, say, C or C++ (Please note I'm not the best at this)
I currently have the following:
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
cd "C:\img\Unsorted"
:SORT
FOR /R %%f IN (*.jpg *.png *.gif *.jpeg) DO (
echo Current file is: %%f
start "" "D:\Downloads\ImageGlass_Kobe_8.6.7.13_x64\ImageGlass.exe" %%f
CHOICE /N /C 123 /M "PICK A NUMBER (1 (Folder A), 2 (Folder B), or 3(Delete))"%1
IF ERRORLEVEL ==3 GOTO THREE
IF ERRORLEVEL ==2 GOTO TWO
IF ERRORLEVEL ==1 GOTO ONE
GOTO END
:THREE
echo Current file is: %%f ::This is where the output is: 'Current file is: %f' which clearly indicates it forgot the file
move %%f "C:\img\Delete"
echo To the trash it goes!
taskkill /IM ImageGlass.exe
GOTO END
:TWO
echo Folder B Selected
taskkill /IM ImageGlass.exe
move %%f "C:\img\FolderB"
GOTO END
:ONE
echo Folder A
taskkill /IM ImageGlass.exe
move %%f "C:\img\FolderA"
GOTO END
)
:END
goto SORT
The problem i'm running is that it returns "The system cannot find the file specified." Whenever the move command is sent (because it somehow looses the file info??)