batch file to run local from remote location

pppuser

Commendable
Jul 12, 2016
2
0
1,510
hello everyone,
i have batch file that compress all the folders where it located and create self extract file (exe)
the command that execute is
JavaScript:
for /d %%X in (*) do "c:\Program Files\7-Zip\7z.exe" a -sfx "%%X.exe" "%%X\"
i'm trying to simplify the process for some teacher to run batch file from mapped drive (like H) and the batch file do that -
JavaScript:
xcopy h:\class d:\class /s /y
for /d %%X in (*) do "c:\Program Files\7-Zip\7z.exe" a -sfx "%%X.exe" "%%X\"
xcopy d:\class\*.exe q:\students /y
the problem is when it reach to process the compression action it compress the folders on H drive and not on D drive
how can i target the compression to D drive instead of H drive
any halp wold be appreciated