Author |
Message |
Alice
Joined: 29 Jan 2015 Posts: 277
|
Posted: Fri Feb 09, 2024 9:47 am Post subject: VV6 - Optimising deletion of remote files & folders |
|
|
Hey there. VV6 is fast, super-fast !! That's been established.
With that in mind I am seeking to increase the speed of deletions on a Windows Server (the Destination) by running an initial VV Job to delete the data held there....rather than using DOS 'RD S:\-Serv~1\Utils\Image /S /Q' or similar, then I will run a second VV Job to copy data to the Destination.
Way back I remember you telling me a quick method to delete data with VV is to 'Mirror Copy' an empty folder to the Destination, thereby wiping its contents ? With multi-threading that should be mega-fast.
So is that concept 'sound' ?
I run a batch file which calls the 'copy data' VV Job, that VV Job runs the 'wipe data' VV Job via another batch file call in 'Run scripts before comparison'.
I need to consider 'silent' running for the 'wipe' VV Job via /hiddenautoexec ? How does the 'copy data' VV Job know the 'wipe data' VV Job has completed, before it tries to start ? |
|
Back to top |
|
|
TGRMN Software Site Admin
Joined: 10 Jan 2005 Posts: 8761
|
Posted: Fri Feb 09, 2024 11:19 am Post subject: |
|
|
Hi Alice,
Quote: | Way back I remember you telling me a quick method to delete data with VV is to 'Mirror Copy' an empty folder to the Destination, thereby wiping its contents ? With multi-threading that should be mega-fast.
So is that concept 'sound' ? |
Yes, if you Backup (Mirror) an empty source vs a target then all files will be deleted from target. You need to enable the option in advanced settings:
No empty source/target check: By default ViceVersa will stop if a source or a target does not contain any files. Activate this option to disregard this check. Do not enable unless required.
Or you could have just one file in source, then all other files are deleted from target.
Note that the files are not sent to the recycle bin over the network.
Quote: | I need to consider 'silent' running for the 'wipe' VV Job via /hiddenautoexec ? How does the 'copy data' VV Job know the 'wipe data' VV Job has completed, before it tries to start ?
|
You can have a .bat file or other script running the delete profile first and then the copy profile., e.g. You can use the the start /wait command. This starts an application and waits for it to end.
Or in VVEngine you can chain profiles to run one after the other.
You could also have the 'delete' profile running from a batch that 'Run scripts before comparison' from the copy profile, make sure you use start /wait _________________ --
TGRMN Software Support
http://www.tgrmn.com
http://www.compareandmerge.com |
|
Back to top |
|
|
Alice
Joined: 29 Jan 2015 Posts: 277
|
Posted: Sat Feb 10, 2024 2:24 pm Post subject: |
|
|
Thank you for your help.
Right, so there are two .fsf files.
Blank-Images-Folder.fsf
which Mirror copies an empty folder to the Destination in order to clear it of data.
Then a second .fsf file that copies a C: drive folder with its files to the now empty Destination :
Utclup.fsf
If I run them manually and in sequence (ie the first has to complete before the second one executes), using my own fair hands, obviously they work So the issue is around how to 'call' them and have them run in sequence. I guess I could use VVengine (as we own v 3.0), but this copy is user-initiated, ie its run 'as and when' a person chooses to do it and they also get to see what it is actually going to do before pressing 'Execute' (via /autocompare), so therefore cannot be easily scheduled.
Ideally I need a batch file to run this two-step activity (the previous batch file works fine at the moment cos it just calls Utclup.fsf which runs a second 'RD' batch file via 'Run scripts before comparison' before it itself starts to copy data). Perfect.
But I'm struggling to get the Utclup.fsf to call the same 'wipe' batch file in the same way, but this time it needs to run VV Profile Blank-Images-Folder.fsf instead of an RD DOS command.
The initial batch file to begin the whole process contains :
start "viceversa" "c:\Apps\ViceVersa Pro\ViceVersa.exe" "C:\Data2\Publishers\Tgrmn\ViceVersa Pro Profiles & .bats\PC\Profiles\utclup.fsf"/autocompare
exit
then within the Utclup.fsf (via 'Run scripts before comparison') it calls another batch file to start the wipe, it contains :
start "viceversa" "c:\Apps\ViceVersa Pro\ViceVersa.exe" "C:\Data2\Publishers\Tgrmn\ViceVersa Pro Profiles & .bats\PC\Profiles\Blank-Images-Folder.fsf" /wait /hiddenautoexec
exit
what this actually does is, it silently starts to wipe the Destination data but fails to wait for it to complete, before switching to the display of the data copy element of utclup.fsf. But that display will be wrong as the deletion has not yet completed.
Doubtless I'm doing something wrong or in the wrong order, apologies |
|
Back to top |
|
|
TGRMN Software Site Admin
Joined: 10 Jan 2005 Posts: 8761
|
Posted: Sun Feb 11, 2024 4:10 am Post subject: |
|
|
Hi Alice,
in VVEngine you can setup profiles without a schedule, and then run them manually. Can also run profiles in VVEngine via the external console.exe program , which controls VVEngine.
However, it is also possible via a simple batch.
In your example you have:
start "viceversa" "c:\Apps\ViceVersa Pro\ViceVersa.exe" "C:\Data2\Publishers\Tgrmn\ViceVersa Pro Profiles & .bats\PC\Profiles\Blank-Images-Folder.fsf" /wait /hiddenautoexec
exit
however /wait is a flag of cmd command START not ViceVersa:
https://ss64.com/nt/start.html
Please trry with /wait after start in the batch.
---
www.tgrmn.com _________________ --
TGRMN Software Support
http://www.tgrmn.com
http://www.compareandmerge.com |
|
Back to top |
|
|
TGRMN Software Site Admin
Joined: 10 Jan 2005 Posts: 8761
|
|
Back to top |
|
|
Alice
Joined: 29 Jan 2015 Posts: 277
|
Posted: Sun Feb 11, 2024 11:13 am Post subject: |
|
|
Ok, thanks for the reply and advice.
moving '/wait' to just after the 'Start' command did work. But its worth noting that the VV Help file, under 'Command Line Parameters', gives this example :
Quote: | ViceVersa "e:\test\exec.fsf" /hiddenautoexec /wait |
so some potential to confuse. |
|
Back to top |
|
|
TGRMN Software Site Admin
Joined: 10 Jan 2005 Posts: 8761
|
Posted: Sun Feb 11, 2024 9:51 pm Post subject: |
|
|
Ah, yes, you are right.
The /wait flag in ViceVersa has a different meaning:
Code: | [/wait] Waits for other running ViceVersa profiles to finish before starting. |
So, theoretically, you could run first the delete profile in a batch then the copy profile and have the copy profile waiting for the first profile to finish using the /wait flag on the ViceVersa command line. _________________ --
TGRMN Software Support
http://www.tgrmn.com
http://www.compareandmerge.com |
|
Back to top |
|
|
|