Jump to content
Ketarin forum

TheWacoKid

Members
  • Posts

    1
  • Joined

  • Last visited

TheWacoKid's Achievements

Newbie

Newbie (1/14)

  1. I’m new to Ketarin and I’m trying to set up a system that downloads the newest version of software and keeps an archive of older versions. So far this is what I have the program doing. 1) I copy any existing files from the “live” folder to the archive. I then empty that folder. xcopy {root}\Users\Admin\Desktop\Test_Updater\{appname} {root}\Users\Admin\Desktop\Test_Updater\Archived_Versions\{appname} /C /Y cd /d {root}\Users\Admin\Desktop\Test_Updater\{appname} del *.exe 2) Ketarin downloads the newest version to the “live” folder. 3) I use 7zip to archive the file that I moved in step one, and delete the file. cd /d {root}\Users\Admin\Desktop\Test_Updater\Archived_Versions\{appname} for %%f in (*.exe) do (echo %%~nf C:\Users\Admin\Downloads\7za920\7za.exe a %%~nf.7z *exe -aoa %%f) del *.exe The problem I’m having is with the archive’s name. I’m using a variable, that works in cmd prompt, to take the .exe’s name and apply it to the .7z file. Ketarin doesn’t act like cmd in this instance. Instead of taking the variable, it’s saving the file as %%~nf.7z. Here is the version from my .bat file that works without issue. cd /d "C:\Users\Admin\Desktop\Test_Updater\Archived_Versions\WinRAR x64" for %%f in (*.exe) do (echo %%~nf C:\Users\Admin\Downloads\7za920\7za.exe a %%~nf.7z *exe -aoa %%f) Any thoughts on what I’m doing wrong?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.