Grabbing DCS torrent files - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 03-24-2018, 09:28 AM   #1
ontheroadtonull
Junior Member
 
Join Date: Aug 2014
Posts: 9
Default Grabbing DCS torrent files

Those among us who help out by hosting DCS files on seedboxes don't have a regular means to get up-to-date torrent files.

So I searched around and found a Windows Powershell script for monitoring a folder for .torrent files as they are created. The script will detect when .torrent files are written and then copy them to a folder of your choosing. So here it is:

Code:
$folder = 'C:\Program Files\Eagle Dynamics\DCS World OpenBeta\_downloads'
$filter = '*.torrent'
$destination = 'C:\DCSTorrent'
$fsw = New-Object IO.FileSystemWatcher $folder, $filter -Property @{
 IncludeSubdirectories = $true
 NotifyFilter = [IO.NotifyFilters]'FileName, LastWrite'
}
$onCreated = Register-ObjectEvent $fsw Created -SourceIdentifier FileCreated -Action {
 $path = $Event.SourceEventArgs.FullPath
 $name = $Event.SourceEventArgs.Name
 $changeType = $Event.SourceEventArgs.ChangeType
 $timeStamp = $Event.TimeGenerated
 Write-Host "The file '$name' was $changeType at $timeStamp"
 Copy-Item $path -Destination $destination -Force -Verbose
}
The folder C:\Program Files\Eagle Dynamics\DCS World Openbeta\ is the default install folder for 2.5 open beta.

The subfolder _downloads is where DCS updater puts data while it is downloading it. When it starts the bittorrent client it creates a folder called .torrent and puts all torrent files in there. DCS updater usually deletes all content within the _downloads folder after it finishes, so the .torrent folder is usually not present. The script will error out if you specify a folder that doesn't exist.

You can specify your own custom destination by editing the $destination variable. Whichever folder you specify will be the destination for the .torrent files.

There's no need to alter anything other than $folder and $destination

Instructions:
Copy the contents of the script and paste it into a new text file (using notepad, notepad++, or sublime text) and save the file as DCS.ps1
Create a folder for the destination. If you didn't make any changes to the script, create a folder named DCSTorrent on your C: drive.

You can run the script from PowerShell ISE. Use the following command.

Code:
powershell -NoExit -executionpolicy bypass -File '.\DCS.ps1'
The script will remain active until you terminate it with the key combination CTRL + c

You can run the script in PowerShell, rather than PowerShell ISE. If you do, terminate the script by entering the following command.

Code:
Unregister-Event -SourceIdentifier FileCreated
Once the script is running, run the program Update DCS World OpenBeta.

As the torrent download starts, you will see messages appear in Powershell regarding which files are being processed. If all is working you will see .torrent files appear in your destination folder as well.

I'm a noob at powershell so if someone knows a better way to accomplish this I'd sure like to hear it.

Last edited by ontheroadtonull; 03-27-2018 at 01:01 PM.
ontheroadtonull is offline   Reply With Quote
Old 03-24-2018, 01:06 PM   #2
BitMaster
Veteran
 
BitMaster's Avatar
 
Join Date: Oct 2013
Location: SW-Germany
Posts: 5,130
Default

Gonna give this a try and make use of my new cable ISP. Running 24/7 anyway, might as well serve the community with it.

Can I PM you for questions if they arise ?
__________________
Asus Strix Z370-E - Intel i7-8700K@5.2G_delidded - 32GB 3200/3600MHz - Asus 1080GTX-Ti Poseidon 2050/12006- 1x 960Evo 250GB - 2x 850Pro 256GB Raid-0 - 1 x 840 Evo 250GB PageFile - 2x Seagate 2TB - Heatkiller IV - MoRa3-360LT@4x180mm fans - Corsair AXi-1200 - TiR5-Pro - Warthog Hotas - Saitek Combat Pedals - Asus PG278Q 27" WQHD Gsync 144Hz - Oculus Rift VR - Win10Pro64 - Slave to the Machine
BitMaster is offline   Reply With Quote
Old 03-25-2018, 10:15 AM   #3
ontheroadtonull
Junior Member
 
Join Date: Aug 2014
Posts: 9
Default

Quote:
Originally Posted by BitMaster View Post
Gonna give this a try and make use of my new cable ISP. Running 24/7 anyway, might as well serve the community with it.

Can I PM you for questions if they arise ?
Yes, absolutely.

If I'm taking too long to reply, send me a PM on Reddit. I have the same name there.
ontheroadtonull is offline   Reply With Quote
Old 03-25-2018, 02:19 PM   #4
BitMaster
Veteran
 
BitMaster's Avatar
 
Join Date: Oct 2013
Location: SW-Germany
Posts: 5,130
Default

OK, got it working.

At first I thought it was ok to download another beta and have the installer copy the files from my current installs, well, that does not work.

I renamed my current installs for now and forced the installer to actually dl it all.

Once I have both versions downloaded I will look for a client to upload. Which one do you use ? The original bittorrent client or another one ? Havent done much with it lately.


edit:
it's running all good
__________________
Asus Strix Z370-E - Intel i7-8700K@5.2G_delidded - 32GB 3200/3600MHz - Asus 1080GTX-Ti Poseidon 2050/12006- 1x 960Evo 250GB - 2x 850Pro 256GB Raid-0 - 1 x 840 Evo 250GB PageFile - 2x Seagate 2TB - Heatkiller IV - MoRa3-360LT@4x180mm fans - Corsair AXi-1200 - TiR5-Pro - Warthog Hotas - Saitek Combat Pedals - Asus PG278Q 27" WQHD Gsync 144Hz - Oculus Rift VR - Win10Pro64 - Slave to the Machine

Last edited by BitMaster; 03-25-2018 at 07:19 PM.
BitMaster is offline   Reply With Quote
Old 03-25-2018, 08:57 PM   #5
lazduc
Member
 
Join Date: Jan 2011
Location: Washington State
Posts: 406
Default

Bit,

When a patch/fix/update is posted for 2.5 beta, does that effect 1.5.8? How stable is 1.5.8xx?

What does grabbing torrent files do for the updater that I am effected by?

Thanks
Laz
lazduc is offline   Reply With Quote
Old 03-25-2018, 09:55 PM   #6
BitMaster
Veteran
 
BitMaster's Avatar
 
Join Date: Oct 2013
Location: SW-Germany
Posts: 5,130
Default

I havent run 1.5.x for months other than short testing. It's supposed to be "stable".

I dont understand what you mean with what does it do for your updater.
Seeding the files is nothing you need to do as a gamer/enduser or need to take care about.
This is just to distribute the installer files as an additional seed, the more seeders the faster and more reliable the network works. Since I run this rig 24/7 anyway I thought I give it a try.
The UL rate is somehwere around 25-50MBit, hardly ever under 20Mbit/sec...not bad.
__________________
Asus Strix Z370-E - Intel i7-8700K@5.2G_delidded - 32GB 3200/3600MHz - Asus 1080GTX-Ti Poseidon 2050/12006- 1x 960Evo 250GB - 2x 850Pro 256GB Raid-0 - 1 x 840 Evo 250GB PageFile - 2x Seagate 2TB - Heatkiller IV - MoRa3-360LT@4x180mm fans - Corsair AXi-1200 - TiR5-Pro - Warthog Hotas - Saitek Combat Pedals - Asus PG278Q 27" WQHD Gsync 144Hz - Oculus Rift VR - Win10Pro64 - Slave to the Machine
BitMaster is offline   Reply With Quote
Old 03-25-2018, 11:18 PM   #7
lazduc
Member
 
Join Date: Jan 2011
Location: Washington State
Posts: 406
Default

Thanks.
lazduc is offline   Reply With Quote
Old 03-26-2018, 01:37 AM   #8
ontheroadtonull
Junior Member
 
Join Date: Aug 2014
Posts: 9
Default

Quote:
Originally Posted by BitMaster View Post

Once I have both versions downloaded I will look for a client to upload. Which one do you use ? The original bittorrent client or another one ? Havent done much with it lately.
For a bittorrent client, I like Deluge.
ontheroadtonull is offline   Reply With Quote
Old 03-26-2018, 03:32 PM   #9
BitMaster
Veteran
 
BitMaster's Avatar
 
Join Date: Oct 2013
Location: SW-Germany
Posts: 5,130
Default

Thanks, currently using the original BT client but it keeps spamming me with popups and slide-ins..cant put up with it.

Will give it a try.

90GB since yesterday, seems to have slowed down a bit on mondays..haha
__________________
Asus Strix Z370-E - Intel i7-8700K@5.2G_delidded - 32GB 3200/3600MHz - Asus 1080GTX-Ti Poseidon 2050/12006- 1x 960Evo 250GB - 2x 850Pro 256GB Raid-0 - 1 x 840 Evo 250GB PageFile - 2x Seagate 2TB - Heatkiller IV - MoRa3-360LT@4x180mm fans - Corsair AXi-1200 - TiR5-Pro - Warthog Hotas - Saitek Combat Pedals - Asus PG278Q 27" WQHD Gsync 144Hz - Oculus Rift VR - Win10Pro64 - Slave to the Machine
BitMaster is offline   Reply With Quote
Old 03-26-2018, 08:48 PM   #10
LevelPulse
Member
 
LevelPulse's Avatar
 
Join Date: Jun 2015
Location: England
Posts: 340
Default

Mind creating a video tutorial as i'm more of a visual learner? Thanks and really cool thing you've done here.
__________________

Director | Team CoordinatorPC Specs:
Spoiler:
  • Intel I7 8700k 4.7Ghz
  • Gigabyte Aorus Ultra Gaming Z370 Motherboard
  • 16GB Corsair Vengeance DDR4 3000MHz Ram
  • 500GB Samsung Evo 850 SSD
LevelPulse is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 04:03 AM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.