Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Can moving a folder cause directory damage?

Can moving a folder cause directory damage?
Thread Tools
Veltliner
Mac Elite
Join Date: Nov 2006
Location: here
Status: Offline
Reply With Quote
Aug 20, 2008, 04:57 AM
 
The folder I am talking about contains 8000 images.

Currently it is located within the pictures folder.

I want to create a new folder, and move it into it, together with other folders.

I don't know where I read this on this forum (and maybe I just mixed something up), but moving folders around too much could cause problems.

Could it?
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Aug 20, 2008, 05:14 AM
 
Not really.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
OreoCookie
Moderator
Join Date: May 2001
Location: Hilbert space
Status: Offline
Reply With Quote
Aug 20, 2008, 05:19 AM
 
No, that won't cause any damage.
Actually, moving folders is actually a lot quicker than moving all files within a folder -- filesystem-wise, you only move one object.
I don't suffer from insanity, I enjoy every minute of it.
     
Big Mac
Clinically Insane
Join Date: Oct 2000
Location: Los Angeles
Status: Offline
Reply With Quote
Aug 20, 2008, 05:50 AM
 
If such a thing were true, our OS of choice would be mocked to no end. If you come across a reference to that idea, I'd like to see it.

"The natural progress of things is for liberty to yield and government to gain ground." TJ
     
Veltliner  (op)
Mac Elite
Join Date: Nov 2006
Location: here
Status: Offline
Reply With Quote
Aug 21, 2008, 02:13 AM
 
Thanks, guys.

Would have really been weird, although there are really a lot of images in that folder (in subfolders, of course).

Now I know why I had this alarm lamp going on.

If you change the name of user accounts, you can get directory problems. That's what I read. True?
     
Big Mac
Clinically Insane
Join Date: Oct 2000
Location: Los Angeles
Status: Offline
Reply With Quote
Aug 21, 2008, 02:33 AM
 
No, that's not true either. If you change an account name in a certain way you may end up with a newly created home folder that makes it look like all your files are gone, but they're just in the previously named home folder, and that does not constitute directory damage. Performing normal operations isn't going to cause directory damage. Directory damage happens because of hard drive and OS errors that have nothing or very little to do with user interaction.

"The natural progress of things is for liberty to yield and government to gain ground." TJ
     
P
Moderator
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status: Offline
Reply With Quote
Aug 21, 2008, 07:15 AM
 
Doing what you suggest CAN be problematic if the filesystem has a strict path length that is not enforced be the OS. For instance NTFS is limited to a 32 767 character pathname. If we invent a freaky situation where you are already very deep in the filesystem (over 100 directories down) and do what you suggest, it might be problematic. Doing it on Windows is not possible (the OS cuts you off if you try - I've actually seen that happen) but that is in the OS. Say that you're running a third-party driver for NTFS on another OS, and that driver does not enforce the limit, then yes. In theory.

It's not relevant here, however. HFS+ has no such limit, and Mac OS X does not support writing to NTFS. How NTFS-3G handles is more than I know. I just mentioned it here to give some explanation to how such a meme might get started.
     
OreoCookie
Moderator
Join Date: May 2001
Location: Hilbert space
Status: Offline
Reply With Quote
Aug 21, 2008, 07:48 AM
 
Originally Posted by Veltliner View Post
If you change the name of user accounts, you can get directory problems. That's what I read. True?
The problem is not because you move a directory, but because you have (successfully) moved a directory and forgot to tell parts of OS X about it. When OS X tries to load your preferences, it tries to look them up using the old path name (before you've moved it, that is). And then it discovers that they are no longer there, that's where the problems stem from.

If you want to relocate your home directory or change the short name of your user, this is quite easy using Leopard at least.

(1) Open the System Prefs.
(2) Select Users from the list and authenticate if necessary.
(3) Right-click the user name whose location of the home directory you want to change and select Advanced.
(4) Now you can change (among other things) the location of your home directory or the short name of your user.

Unfortunately, not many people know about this and they try doing things by hand -- which is what screws up OS X.
I don't suffer from insanity, I enjoy every minute of it.
     
Veltliner  (op)
Mac Elite
Join Date: Nov 2006
Location: here
Status: Offline
Reply With Quote
Aug 23, 2008, 11:27 PM
 
Originally Posted by OreoCookie View Post

If you want to relocate your home directory or change the short name of your user, this is quite easy using Leopard at least.

(1) Open the System Prefs.
(2) Select Users from the list and authenticate if necessary.
(3) Right-click the user name whose location of the home directory you want to change and select Advanced.
(4) Now you can change (among other things) the location of your home directory or the short name of your user.

Unfortunately, not many people know about this and they try doing things by hand -- which is what screws up OS X.
Thanks for the good tips everybody!

I'll mark this for my next operating system.

Currently, I'm still running Tiger (still roars pretty nicely, and I like the pattern of the fur)
     
Veltliner  (op)
Mac Elite
Join Date: Nov 2006
Location: here
Status: Offline
Reply With Quote
Aug 23, 2008, 11:30 PM
 
To close the directory damage paranoia thread:

If I have a folder, that contains, let's say, four to six dozen folders and 8000 items, then all the directory entries of all the folders and images have to be rewritten by the OS?

Is this right?

I suppose, as renaming folders is a truly basic operation, it is still save to do with a folder that contains so many files?
     
Cold Warrior
Moderator
Join Date: Jan 2001
Location: Polwaristan
Status: Offline
Reply With Quote
Aug 23, 2008, 11:45 PM
 
If you're moving it around on the same drive path, it will be instant and it won't have to rewrite or copy any files.
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Aug 24, 2008, 02:55 AM
 
Moving files around on the same volume never requires them to be rewritten. Copying a file obviously requires the copy to be written, but just moving things around doesn't require new copies to be made any more than it does in real life. In fact, under Unix operating systems like OS X, moving a file and renaming a file are considered to be the same thing — in both cases, you're just changing the path that identifies the file.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
P
Moderator
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status: Offline
Reply With Quote
Aug 24, 2008, 03:31 PM
 
Assuming that you're using HFS...

All files are listed in the Catalog File on the disk. Each file is listed in the Catalog File with various metadata - name, dates of modification creation and last access, labels etc. One of these that you normally can't see is its parent directory or folder. Same goes for all folders - the parent folder is stored, but only that. When moving a folder like you described, you update only the record of the folder you just moved - the records for anything included in the folder are not touched.
     
CharlesS
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Aug 24, 2008, 04:25 PM
 
There are several ways that your hard drive could become damaged while moving a file:

1. You move a file, and at that very moment lightning strikes and causes a power surge that fries your hard drive.

2. You move a file, and at that very moment someone smashes the hard drive with a sledgehammer.

3. You move a file, and at that very moment a magnitude 8.0 earthquake hits and your hard drive falls into a fissure in the earth, never to be seen again.

4. You move a file, and at that very moment a meteor crashes into your house, leaving only a crater in its wake.

5. You move a file, and at that very moment somebody hits the nuclear button and your entire city goes up in a giant mushroom cloud.

Other than these possibilities, I'd probably not worry about it.

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
zykron
Fresh-Faced Recruit
Join Date: Aug 2008
Location: UMaine
Status: Offline
Reply With Quote
Aug 24, 2008, 06:49 PM
 
There's also the excuse that your dog ate your hard drive while moving a file. LOL
     
Veltliner  (op)
Mac Elite
Join Date: Nov 2006
Location: here
Status: Offline
Reply With Quote
Aug 25, 2008, 08:29 PM
 
Originally Posted by Chuckit View Post
Moving files around on the same volume never requires them to be rewritten. Copying a file obviously requires the copy to be written, but just moving things around doesn't require new copies to be made any more than it does in real life. In fact, under Unix operating systems like OS X, moving a file and renaming a file are considered to be the same thing — in both cases, you're just changing the path that identifies the file.
So changing the path is one of the almost failsafe things.
     
Veltliner  (op)
Mac Elite
Join Date: Nov 2006
Location: here
Status: Offline
Reply With Quote
Aug 25, 2008, 08:30 PM
 
Originally Posted by P View Post
Assuming that you're using HFS...

All files are listed in the Catalog File on the disk. Each file is listed in the Catalog File with various metadata - name, dates of modification creation and last access, labels etc. One of these that you normally can't see is its parent directory or folder. Same goes for all folders - the parent folder is stored, but only that. When moving a folder like you described, you update only the record of the folder you just moved - the records for anything included in the folder are not touched.
So it's a little bit like the "history" in Photoshop...
     
tooki
Admin Emeritus
Join Date: Oct 1999
Location: Zurich, Switzerland
Status: Offline
Reply With Quote
Aug 25, 2008, 09:22 PM
 
Errr... not really.

Think of it more like this: a library full of books, each one corresponding to a block on disk. The catalog file (aka directory) is like the card catalog, with a card for each file on disk (and if the file is broken up into pieces, it lists where each piece is).

Moving files (or folders) with a disk simply involves moving the "catalog cards" while leaving the "books" where they are.
     
   
Thread Tools
 
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -4. The time now is 06:57 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,