|
| Author |
Message |
littlejob Newbie



 Joined: 07 Feb 2008 Posts: 3
|
|
 |
Im looking for a script that can backup users files into a zip folder and throw it onto a server.
The problem i am having is that winzip is that the max zip size is 4 gigs, so how to you right the code to create another zip after these 4 gigs?
It creates a date folder, prompts for username to create the root folder, then backs up the files i set it to to the location.
Need help with zipping it up, and somehow seperating the 4+ gig files into seperate ones.
---------------------------
@echo off
:: variables
set drive=H:\
set backupcmd=xcopy /s /c /d /e /h /i /r /k /y
echo What is your username?
set /p username=
cls
echo ### Backing Up Files...
set folder=%date:~10,4%_%date:~4,2%_%date:~7,2%
%backupcmd% "%USERPROFILE%\Favorites" "%drive%\%folder%\%username%\Favorites"
echo ### Backing up Desktop...
%backupcmd% "%USERPROFILE%\Desktop" "%drive%\%folder%\%username%\Desktop"
echo ### Backing up My Documents...
%backupcmd% "%USERPROFILE%\My Documents" "%drive%\%folder%\%username%\My Documents"
echo ### Backing up email and contacts (MS Outlook)...
%backupcmd% "%USERPROFILE%\Local Settings\Application Data\Microsoft\Outlook" "%drive%\%folder%\%username%\Outlook"
echo ### Backing up Nethood...
%backupcmd% "%USERPROFILE%\NetHood" "%drive%\%folder%\%username%\NetHood"
cls
echo Backup Complete!
@pause |
|
|
Date Posted:Thu Apr 23, 2009 5:32 pmThanks: 0Thanked 0 Times In 0 Posts
|
| Author |
Message |
Dackstar Asta GFX Team



 Joined: 22 Sep 2007 Posts: 5838 Location: Newcastle-upon-Tyne, United Kingdom
|
|
 |
WinRAR is an alternative.
It also features console/command line features like WinZip so that's not a problem. With WinRAR, you can set it to create archives in "parts". So that you could set it to split a 6GB file into specified amounts (eg, 3.75GB allowed per part so you would get one full 3.75GB file and one 2.25GB file). This might sound confusing (I'm not brilliant at explanations) but it becomes clearer once you see it.
Hope this helps.
Edit: In fact, if it really is WinZip that cannot make 4GB files rather than the HDD being set in FAT/32:
| WinRAR's Website wrote: |
| WinRAR supports files and archives up to 8,589 billion gigabytes in size. |
So you won't even need to split up the file into parts.  |
_________________
|
|
Date Posted:Thu Apr 23, 2009 9:30 pmThanks: 2147Thanked 3314 Times In 1585 Posts
|
Astalavista Forum Index :: Programming Solutions :: Backup .BAT FILE HELP!!
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|