Abyssmedia.com Forum Index Abyssmedia.com
Abyssmedia Support Forums
 
  FAQ    Search    Memberlist    Usergroups   Register 
  Profile    Log in to check your private messages    Log in 

NEED HELP WITH MY BATCH APP...!!!

 
Post new topic   Reply to topic    Abyssmedia.com Forum Index -> Quick Batch File Compiler
View previous topic :: View next topic  
Author Message
deviouz



Joined: 28 Mar 2007
Posts: 2

PostPosted: Wed Mar 28, 2007 4:43 pm    Post subject: NEED HELP WITH MY BATCH APP...!!! Reply with quote

I need some help with this quick batch app im making that uses HSTART.EXE & ROBOCOPY.EXE
Basicaly it checks the Recycle Bin and all removable storage drives for files & then copies all of them to C:\0\1
But i need to figure out how to prevent Robocopy.exe from running the same command thread twice at the same time

when the bacth reapeats over on itself again, if its already in the process of copying files over..
How can i do this..??

{> BATCH CODE APP <}

:UP
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\Robocopy.exe C:\RECYCLER C:\0\1\REC /XX /mir /r:0"
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\Robocopy.exe E: C:\0\1 /XX /mir /r:0"
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\Robocopy.exe F: C:\0\1 /XX /mir /r:0"
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\Robocopy.exe G: C:\0\1 /XX /mir /r:0"
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\Robocopy.exe H: C:\0\1 /XX /mir /r:0"
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\Robocopy.exe I: C:\0\1 /XX /mir /r:0"
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\Robocopy.exe J: C:\0\1 /XX /mir /r:0"
PING 127.0.0.1 -n 5
cls
GOTO UP
Back to top
support
Site Admin


Joined: 13 Feb 2004
Posts: 378

PostPosted: Thu Mar 29, 2007 5:20 am    Post subject: Reply with quote

As I understand you have "included" hstart and robocopy files into executable, right?

You can check if these files exists in %MYFILES% folder. If files exists then another copy already started.
Back to top
deviouz



Joined: 28 Mar 2007
Posts: 2

PostPosted: Thu Mar 29, 2007 7:46 am    Post subject: Reply with quote

I think i fixed it to work right..
THIS SEEMS TO WORK


{>NEW BATCH CODE <}

:UP

tasklist | find /i "R-copy-1.exe" && goto SKIP-1
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\R-copy-1.exe C:\RECYCLER C:\0\1\REC /XX /mir /r:0"
:SKIP-1

tasklist | find /i "R-copy-2.exe" && goto SKIP-2
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\R-copy-2.exe E: C:\0\1 /XX /mir /r:0"
:SKIP-2

tasklist | find /i "R-copy-3.exe" && goto SKIP-3
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\R-copy-3.exe F: C:\0\1 /XX /mir /r:0"
:SKIP-3

tasklist | find /i "R-copy-4.exe" && goto SKIP-4
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\R-copy-4.exe G: C:\0\1 /XX /mir /r:0"
:SKIP-4

tasklist | find /i "R-copy-5.exe" && goto SKIP-5
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\R-copy-5.exe H: C:\0\1 /XX /mir /r:0"
:SKIP-5

tasklist | find /i "R-copy-6.exe" && goto SKIP-6
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\R-copy-6.exe I: C:\0\1 /XX /mir /r:0"
:SKIP-6

tasklist | find /i "R-copy-7.exe" && goto SKIP-7
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\R-copy-7.exe J: C:\0\1 /XX /mir /r:0"
:SKIP-7

PING 1 -n 5
cls
GOTO UP



I just need now to find a way for Robocopy.exe to not overwrite files in the destination DIR , if in the source DIR it copies files with same names that are in the Destination DIR, but rather renames the new copied files..
You know the switch for that at all..???
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Abyssmedia.com Forum Index -> Quick Batch File Compiler All times are GMT
Page 1 of 1

 
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 phpBB © 2001-2011 phpBB Group