Link to home
Create AccountLog in
Avatar of Michael Leonard
Michael LeonardFlag for United States of America

asked on

please advise how i can start this script in a different directory

can someone provide a way that i can run this script from a different directory, than the directory that I'm zipping up the folders:

@echo off
for /d %%X in (*) do "c:\Program Files\7-Zip\7z.exe" a "%%X.zip" "%%X\"

Open in new window


to clarify.  I'd like to run the script from c:\scripts

but have it execute on:  c:\data\target1\

many thanks

S.
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Michael Leonard

ASKER

thanks bill!