| View previous topic :: View next topic |
| Author |
Message |
mindkiller PRIVATE

 Joined: 30 May 2010 Posts: 58 Membership: General member
|
Posted: Wed Jun 23, 2010 7:14 pm Post subject: Question related to VB 2008 and Batch |
|
|
Hi guys,
I'm basically making a small program (with a GUI) in vb 2008 that allows you to back-up your MW2 profile folder. I have a perfectly working code in Batch (got it from the internet) and I've got the idea to simply use the Shell command in VB2008 to run the batch. Now, the Batch code:
| Code: |
@ECHO OFF
echo Launching backup script...
echo Loading script...
::Backup
echo Backing up files...
for /f "tokens=1,2" %%u in ('date /t') do set d=%%v
for /f "tokens=1" %%u in ('time /t') do set t=%%u
if "%t:~1,1%"==":" set t=0%t%
set timestr=%d:~6,4%%d:~0,2%%d:~3,2%_%t:~0,2%%t:~3,2%
cd "C:\Program Files (x86)\steam\SteamApps\common\call of duty modern warfare 2"
MD backup
CD backup
MD players
CD players
echo Copying files...
xcopy "C:\Program Files (x86)\steam\SteamApps\common\call of duty modern warfare 2\players" /c /i /r /y
cd..
echo Renaming files...
rename players players_%timestr% |
But obviously, I can't run this on my 32 bit system as it does not use the same path to MW2, is there a way to detect, using Batch or whatsoever, the actual location of MW2? My first thought was using a register key but I'm not familiar with that at all.
I appreciate your help![/code] |
|
| Back to top |
|
 |
|
|
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 You cannot attach files in this forum You cannot download files in this forum
|
82,660,496
Powered by phpBB © 2001, 2005 phpBB Group
|