Quote:
Originally Posted by BLACKFIRE69
Code:
@echo off
set /p num=Enter output archive name:
set/p comp= Enter Compression Method:
set "InputDir=%~dp0In"
set "OutputDir=%~dp0Out"
cd /d "C:\Users\BLACKFIRE69\Downloads\Compressed\Test\Binaries"
arc.exe a -ep1 -dses --dirs -s; -lc- -di -i2 -r -w.\Temp -m%comp% "%OutputDir%\MASQUERADE-Data_%num%.MSQ" "%InputDir%\%num%\*"
pause&exit
|
I think you made cls without considering that Current directory can change, simple fix is the usage of SetCurrentDir function when your cls launches like this
SetCurrentDir(ExtractFilePath(GetModuleName));
where GetModuleName is
Code:
function GetModuleName: string;
var
szFileName: array [0 .. MAX_PATH] of char;
begin
FillChar(szFileName, sizeof(szFileName), #0);
GetModuleFileName(hInstance, szFileName, MAX_PATH);
Result := szFileName;
end;
A better fix is directly execute every single exe file with full paths and set the work directory too