如何一次备份特定文件夹中所有用户的所有用户数据?
问题:
新的应用程序安装正在迫使该特定应用程序的系统设置完全擦除,该应用程序 Alteryx 用于我们组织中的数据分析。我们的愿望是创建位于c:\ users \%用户名\ appdata \ local \ local \ ableyx
and code> and c:\ users \%用户\%username%\ appdata \ roaming的所有用户对象的备份\ Alteryx
到特定的备份位置。
可以用一个脚本做到这一点吗?
到目前为止有效的方法:
尝试使用Robocopy
如下所示,但仅适用于我的用户:
robocopy "%userprofile%\AppData\Local\Alteryx" "C:\AlteryxUserBackup\\%username%\AppData\Local\Alteryx" /E /log:C:\AlteryxUserBackup\\%username%\BackupLogLocal.txt
robocopy "%userprofile%\AppData\Roaming\Alteryx" "C:\AlteryxUserBackup\\%username%\AppData\Roaming\Alteryx" /E /log:C:\AlteryxUserBackup\\%username%\BackupLogRoaming.txt
echo Backup Complete!
我已经对每个循环进行了尝试,以指定文件夹中username%
的变量,但是还没有运气。如果需要更多的解释,请告诉我,我可以尝试进一步解释。仅要求提供任何解决方案,因为我本质上不是程序员。
Problem:
New application install is forcing a complete wipe of system settings for this particular application, Alteryx, used for data analytics in our organization. Our desire is to create a backup of all user objects located at C:\Users\%username%\AppData\Local\Alteryx
and C:\Users\%username%\AppData\Roaming\Alteryx
to a specific backup location.
Is it possible to do this in one script?
What worked so far:
Have tried using robocopy
as follows, which works, but only for my user:
robocopy "%userprofile%\AppData\Local\Alteryx" "C:\AlteryxUserBackup\\%username%\AppData\Local\Alteryx" /E /log:C:\AlteryxUserBackup\\%username%\BackupLogLocal.txt
robocopy "%userprofile%\AppData\Roaming\Alteryx" "C:\AlteryxUserBackup\\%username%\AppData\Roaming\Alteryx" /E /log:C:\AlteryxUserBackup\\%username%\BackupLogRoaming.txt
echo Backup Complete!
I have experimented with for each loops on specifying a variable for the %username%
in the folder, but no luck yet. If more explanation is needed please let me know and I can try to explain further. Only request that any solutions provided be clear to follow as I am not a programmer by nature.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我能够通过此解决方案回答自己的问题:
希望这对某人有帮助。
%〜fd
和%〜nxd
变量很难弄清楚,但却做到了。通过反转路径顺序,此脚本也可以作为还原对象的有效方法。I was able to answer my own question with this solution:
Hopefully this is helpful to someone. The
%~fd
and%~nxD
variables were difficult to figure out but did the trick. By inverting the path order, this script can also function as an effective method of restoring objects, as well.