Backup .BAT FILE HELP!!
Astalavista Forum Index :: Programming Solutions :: Backup .BAT FILE HELP!!
Post new topic   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
  Backup .BAT FILE HELP!!
Author Message
littlejob
Newbie
Newbie


Offline
No Image
Joined: 07 Feb 2008
Posts: 3

Reply with quote
No Image
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
View user's profile Send private message
PostDate Posted:Thu Apr 23, 2009 5:32 pm
Thanks: 0Thanked 0 Times In 0 Posts

Author Message
Dackstar
Asta GFX Team
Asta GFX Team


Offline
No Image
Joined: 22 Sep 2007
Posts: 5838
Location: Newcastle-upon-Tyne, United Kingdom

Reply with quote
No Image
WinRAR is an alternative. Smile
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. Wink

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. Very Happy

_________________
View user's profile Send private message Visit poster's website MSN Messenger
PostDate Posted:Thu Apr 23, 2009 9:30 pm
Thanks: 2147Thanked 3314 Times In 1585 Posts

Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    Page 1 of 1 All times are GMT


Back to top


 
Astalavista Forum Index :: Programming Solutions :: Backup .BAT FILE HELP!!



Search This Topic:
Jump to:  
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


Powered by Astalavista.MS Team © 2004
Image Here Image Here Image Here