Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6927285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:01:57+00:00 2026-05-27T11:01:57+00:00

problem intro: Dead Island game crashes once save file exceeds certain file size. Files

  • 0

problem intro:
Dead Island game crashes once save file exceeds certain file size. Files are archives, but with .sav extension rather than .zip.
I want to make a script that will loop through *.sav files, copy them to another location with same file name, but as *.zip, then extract them, check extracted file size, and alert me if file size exceeds the limit.

So far, I got this:

@ECHO OFF
setlocal enableextensions enabledelayedexpansion
FOR %%i IN ("D:\Games\Dead Island\out\save\"*.sav) DO (
set str=
set str=!str!%%i
set str=!str:.sav=.zip!
echo !str!
copy %%i !str!
)
PAUSE

for some reason bat files have problems assigning values to variables within FOR loops, so I found a solution to use delayedexpansion.

but currently my biggest problem is that it just wont copy save_1.sav to another location with name save_1.zip!

once I get past this, I will dive into 7zip unpacking and file size verification (along with all other stuff needed), but this is just frustrating 🙂
maybe I should just do this in python…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T11:01:58+00:00Added an answer on May 27, 2026 at 11:01 am

    If you want to change the file extension of something, you can use %%~n<variable> to get the stem, like so (taken from one of my batch files):

    FOR %%f IN (*.ebr) DO (
        hcsg -c %%f %%~nf.cg1
        hbsp -c %%~nf.cg1 nohints %%~nf.ct1
        hportal -c %%~nf.ct1 %%~nf.cp
        hflood -c %%~nf.ct1 %%~nf.cp %%~nf.cg2
        hbsp -c %%~nf.cg2 nohints %%~nf.ct2
    )
    

    This might be useful:

    http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/percent.mspx?mfr=true

    In your case, I guess you could just do something like:

    FOR %%f IN (*.sav) DO (
        copy %%f %%~nf.zip
    )
    

    (Just tested this at the command line — where you use % instead of %% if you want to try it — and it works.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Running into a problem where on certain servers we get an error that the
I'm learning Rails, and got into a little problem. I'm writing dead simple app
I originally set up spring with xapool, but it turns out that's a dead
i have a problem with rendering image on RDL file in reporting services (SQL
I'm going over the proof for The Halting Problem in Intro to the Theory
As the question states, does the integer-factorization problem fall into the class of NP-Complete
Running into a problem. I have a table defined to hold the values of
A problem I ran into a while back I never found a good solution
Been running into this problem lately... When debugging an app in VS.Net 2005, breakpoints
I ran into the problem that my primary key sequence is not in sync

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.