INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Rename, Move and Copy problem  (Read 2362 times)

Vincent Kars

  • Citizen of the Universe
  • *****
  • Posts: 1154
Rename, Move and Copy problem
« on: April 14, 2015, 02:17:27 pm »

Rename, Move and Copy files

A very powerful tool I use often.
Also very useful to screw up the file system.
You want to remove something from a long path/file name but you leave a space at the end of a path or a file name.
This is something Windows can’t stand.
It faithfully displays it in Explorer but you can’t access the files anymore.
Likewise, JRiver can’t roll back.

Hence a feature request: check that path/filename is valid (including no trailing spaces) before executing the operation.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71370
  • Where did I put my teeth?
Re: Rename, Move and Copy problem
« Reply #1 on: April 14, 2015, 02:26:18 pm »

I just tried this on Win7 and changed the directory to:

D:\test\bit\ adding a space and then the filename.

No problem.  It worked.

Are the files on a local drive?  Or on a NAS?

A specific example might help.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41941
  • Shoes gone again!
Re: Rename, Move and Copy problem
« Reply #2 on: April 14, 2015, 02:28:59 pm »

In our code, we do this:

// fix the filename
JRFileSystem::FixFilename(strNewFilename, true, _T('_'), false);

Inside of that it calls:

// get rid of leading and trailing white space
strFilename.Trim();

So there shouldn't be trailing spaces before the name or after the extension. 

We don't trim in between the name and extension (so blah  .blah) would pass through.  Is that the issue?

Thanks.
Logged
Matt Ashland, JRiver Media Center

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41941
  • Shoes gone again!
Re: Rename, Move and Copy problem
« Reply #3 on: April 14, 2015, 02:36:35 pm »

I renamed a file to [Name] .ape and it worked fine.
Logged
Matt Ashland, JRiver Media Center

Vincent Kars

  • Citizen of the Universe
  • *****
  • Posts: 1154
Re: Rename, Move and Copy problem
« Reply #4 on: April 14, 2015, 02:57:23 pm »

Sorry, it is not in the file name but in the Path

C:\Users\Vincent\Music\Work\Onslow - Copy\Onslow-Quatuor-RuggieriV2\01-02-George_Onslow-II_adagio-SMR.flac
Use the Rename/Move etc but leave a space in the path
C:\Users\Vincent\Music\Work\Onslow - \Onslow-Quatuor-RuggieriV2\01-02-George_Onslow-II_adagio-SMR.flac

Now in Win (8.1) explorer you can't delete the folder because of the space
Likewise JRiver can delete the track but not the folder.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41941
  • Shoes gone again!
Re: Rename, Move and Copy problem
« Reply #5 on: April 14, 2015, 03:04:39 pm »

Sorry, it is not in the file name but in the Path

C:\Users\Vincent\Music\Work\Onslow - Copy\Onslow-Quatuor-RuggieriV2\01-02-George_Onslow-II_adagio-SMR.flac
Use the Rename/Move etc but leave a space in the path
C:\Users\Vincent\Music\Work\Onslow - \Onslow-Quatuor-RuggieriV2\01-02-George_Onslow-II_adagio-SMR.flac

Now in Win (8.1) explorer you can't delete the folder because of the space
Likewise JRiver can delete the track but not the folder.


But we already handle those spaces:
// get rid of any mixture of periods and white space preceding or following directory separators

And when I test and put " [Artist] " in the rule dialog, it trims the spaces off.
Logged
Matt Ashland, JRiver Media Center

Vincent Kars

  • Citizen of the Universe
  • *****
  • Posts: 1154
Re: Rename, Move and Copy problem
« Reply #6 on: April 14, 2015, 03:14:38 pm »

I use the Find&Replace
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41941
  • Shoes gone again!
Re: Rename, Move and Copy problem
« Reply #7 on: April 14, 2015, 03:23:07 pm »

Ah, I see.

Next build:
Fixed: Using Find and Replace in the Rename, Move & Copy Files dialog would incorrectly allow putting a space at the end of a folder name.
Logged
Matt Ashland, JRiver Media Center

syndromeofadown

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 805
Re: Rename, Move and Copy problem
« Reply #8 on: April 14, 2015, 03:28:19 pm »

This looks related
http://yabb.jriver.com/interact/index.php?topic=80520.msg548092#msg548092

Quote
Next build:
Fixed: Using Find and Replace in the Rename, Move & Copy Files dialog would incorrectly allow putting a space at the end of a folder name.
Awesome

I never could delete the folders that I was having issues with.
I believe I copied all files to a new drive then formatted to get rid of them.
Logged

Vincent Kars

  • Citizen of the Universe
  • *****
  • Posts: 1154
Re: Rename, Move and Copy problem
« Reply #9 on: April 14, 2015, 03:39:24 pm »

Fixed: Using Find and Replace in the Rename, Move & Copy Files dialog would incorrectly allow putting a space at the end of a folder name.

 :)
Logged

Vincent Kars

  • Citizen of the Universe
  • *****
  • Posts: 1154
Re: Rename, Move and Copy problem
« Reply #10 on: April 14, 2015, 03:51:12 pm »

I never could delete the folders that I was having issues with.

You can but it is a bit tedious

Start CMD.exe
CD to the parent directory
DIR/X for 8.3 file name
RMDIR 8.3 fiename/s

Have a happy DOS
Logged
Pages: [1]   Go Up