简体   繁体   English

我试图将我的游戏保存从 appdata 目录复制到另一个驱动器以进行备份,但文件不会复制

[英]I'm trying to copy my game saves from the appdata directory to another drive for backup purposes but the files wont copy

I'm trying to copy my save files for my games from my AppData directory to another drive on my system but the files fail to copy.我试图将我的游戏保存文件从我的 AppData 目录复制到我系统上的另一个驱动器,但文件复制失败。 I'm using robocopy to try to achieve this and am not sure what is going wrong.我正在使用 robocopy 来尝试实现这一目标,但我不确定出了什么问题。

The Script I'm using is:我正在使用的脚本是:

@echo off
set "source=C:\Users\MyUser\AppData"
set "destination=F:\Game_Saves"
robocopy "%source%" "%destination%" /E /Z /J /EFSRAW /W:1 /R:0 /REG /XJ
exit /b

I've had times where I went to play a game after some drive failure or general errors from my ISCSI drives changing letters and losing my save for my games through Epic Games because of the crappy download system they use and i just want to backup my saves to the other drive and then using duplicati to do a more long term backup and cant seem to find out why the files wont copy.我曾经有过一些驱动器故障或我的 ISCSI 驱动器出现一般错误后去玩游戏的情况,因为他们使用糟糕的下载系统,我通过 Epic Games 更改了字母并丢失了我的游戏保存,我只想备份我的保存到另一个驱动器,然后使用 duplicati 进行更长期的备份,但似乎无法找出文件无法复制的原因。 If anyone can help me troubleshoot this I'd be very greatful.如果有人可以帮助我解决此问题,我将非常感激。

I tried changing flags in my script and setting flags I thought might be helpful to my usage but it hasn't worked.我尝试更改脚本中的标志并设置我认为可能对我的使用有帮助的标志,但没有奏效。 I just dont want to lose my saves as some of them have 100s of hours in them.我只是不想失去我的储蓄,因为其中一些有 100 多个小时。 I should also mention that I want my script to complete as fast as possible which is why I don't have any retries set as the only errors I was running into were "Permission Denied" errors for folders I don't need to backup.我还应该提到我希望我的脚本尽快完成,这就是为什么我没有设置任何重试,因为我遇到的唯一错误是我不需要备份的文件夹的“权限被拒绝”错误。

Drive F:\ is just a slow SATA hard drive in my PC and not an ISCSI drive and "copy.bat" my batch script is in the root of F:\驱动器 F:\ 只是我 PC 中的一个慢速 SATA 硬盘驱动器,而不是 ISCSI 驱动器,我的批处理脚本“copy.bat”位于 F:\

Task Scheduler Settings:任务计划程序设置:

  • General:一般的:
    • Run whether user is logged in or not - yes无论用户是否登录都运行 - 是
    • Run with highest privileges - yes以最高权限运行 - 是
  • Triggers:触发器:
    • Run weekly - yes每周运行 - 是
    • Stop task if it runs for longer than - 4 hours如果任务运行时间超过 - 4 小时,则停止任务
    • Enabled - yes启用 - 是
  • Actions:动作:
    • Start a Program - yes启动程序 - 是
    • Program/Script - F:\copy.bat程序/脚本 - F:\copy.bat

Removing the /EFSRAW flag worked to copy the files though I'm still unsure as to why it was causing interference in the first place unless it just doesn't allow the copy of un-encrypted files in the first place with that flag set.删除 /EFSRAW 标志可以复制文件,但我仍然不确定为什么它首先会造成干扰,除非它不允许首先使用该标志集复制未加密的文件。

Updated script for others if they want to use it though it is clunky as it copies all of AppData and that is around 80 GB for my computer so this is not recommended.如果其他人想要使用它,则为其他人更新脚本,尽管它很笨重,因为它复制了所有 AppData,并且对于我的计算机来说大约是 80 GB,因此不推荐这样做。

@echo off
set "source=C:\Users\MyUser\AppData"
set "destination=F:\Game_Saves"
robocopy "%source%" "%destination%" /E /Z /J /W:1 /R:0 /REG /XJ /LOG+:copylog.txt
exit /b

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM