Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Moving Files to new drive
23-10-2022, 22:02
Post: #1
Moving Files to new drive
I have a new server for my music and will copy the music files from my old server to the new one.

However, as I understand it, when I install and run MinimServer, the Recently Added index will be rebuilt from the Date Last Modified attribute of each file.

This will not be the same as the existing Recently Added of the old server as I have modified tags etc of many of the files.

I have been trying to think of a way around this and have been searching for a way to set the Date Last Modified to the Date Created attribute.

I am running on windows and have tried the command below but cannot get it to work. The first part appears to work when I run it on its own. However when the results are piped to the second part it fails.

Does anyone know what the correct syntax should be to achieve this. Alternatively, is there another way to preserve to Recently Added from the old server.

   
Find all posts by this user
Quote this message in a reply
24-10-2022, 08:35 (This post was last modified: 24-10-2022 08:41 by simbun.)
Post: #2
RE: Moving Files to new drive
(23-10-2022 22:02)Peter@57m Wrote:  I have been trying to think of a way around this and have been searching for a way to set the Date Last Modified to the Date Created attribute.
Does anyone know what the correct syntax should be to achieve this.
I believe you need to reference the attributes with $_., so $_.CreationTime.

(23-10-2022 22:02)Peter@57m Wrote:  Alternatively, is there another way to preserve to Recently Added from the old server.
I don't use the Recent* functionality, but in the guide it instructs you to make sure you have a backup of the recent folder, so as long as your content directory structure is the same I'd have thought just copying that folder over to the new minimserver install would suffice.

EDIT: Your post seems to suggest that you want to copy creation date to last modified (to essentially roll back the effect of the tag changes on the file dates), but your script does the opposite.
Find all posts by this user
Quote this message in a reply
24-10-2022, 08:42 (This post was last modified: 24-10-2022 08:43 by simoncn.)
Post: #3
RE: Moving Files to new drive
MinimServer keeps information about recently added and recently played files in a folder named "recent". The location of this folder depends on the device you are using to run MinimServer. For example, if you are running MinimServer on Windows, the path to the "recent" folder is C:\Users\your-user-name\AppData\Roaming\MinimServer\recent.

When you have located the "recent" folder on the old server, you need to copy the files added-dates.txt and played-files.txt to the "recent" folder on the new server. There is another file in this folder named added-files.txt which doesn't need to be copied because it will be recreated automatically when MinimServer starts.

I sympathise with your difficulties in finding the right syntax for getting Windows PowerShell to do what you want. Some time ago I created a script for bulk renaming of artwork files and it took many attempts with trial and error before I found the correct syntax to make this work.
Find all posts by this user
Quote this message in a reply
24-10-2022, 09:56 (This post was last modified: 24-10-2022 10:24 by Peter@57m.)
Post: #4
RE: Moving Files to new drive
Thanks you @simbun that syntax works. And you are correct I had it the wrong way round :-)

Thank you @simoncn I will try that when the new unit returns from the dealer.

I can fall back on the modifying of Date Modified if I cannot get the copying of the files to work.

Will report back later on what happened
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)