Problem with passing some folders to MS-DOS Batch Function Button

I think I am either missing something fundamental or I've found a bug (probably the former).

When I do a fresh install of Windows, I always move my personal folders (Documents, Pictures etc) to my D:/ drive. One of the downsides to this is that as I've re-installed Windows 10 Pro, the ownership of any folders and files on drives other than the C:/ drive is pointing to the no longer available USER-ID of the account from the previous installation.

Until now, I've always gone through each folder and recursively updated manually the ownership of that folder to the current main user from the new installation. That was getting tedious with 3 computers to update each time so I went in search of an easier way and found the Windows command 'takeown.exe'.

I proceeded to create a button that would update the ownership of each selected folder recursively to the current logged in user.

This is the MS-DOS Batch Function button I created (not final as it is still in the testing stage):

@admin 
@leavedoswindowopen 
//@runmode:min
C:\Windows\System32\takeown.exe /f {filepath} /r

Now this button works fine for most folders. The ones I'm having problems with are the personal folders that I move from the user folder on C:/ to the D:/ drive.

When viewed in either DOpus or Explorer, these folders appear as 'Documents, Pictures, Music, Downloads and Videos. However, if I look at the location bar, all the folders are prefixed with 'Local' - 'Local Documents', 'Local Pictures' etc.

Here is my 'Downloads' folder

When I click on the breadcrums, this is what appears:

Because of this, the button above fails when I select these folders with the following error:

I assume this is because DOpus is passing 'Downloads' and not 'Local Downloads'.

So, am I missing something or is this a bug? I have read through (what I think are) the relevant sections of the docs but cannot fond the answer.

Thanks.

Directory Opus Pro 12.9.1 (Beta) Build 6733 x64
OS 10.0 (B:17134 P:2 T:1) SP 0.0

It may be DOS being awful with quotes and backslashes.

Instead of {filepath}, try {filepath|noterm}.

1 Like

That seems to have fixed it Leo. Thanks.

1 Like