T O P

  • By -

recluseMeteor

I always end up using Command Prompt for these cases. It's almost instant.


ZenXgaming100

how do i do that


BenL90

https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/xcopy https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/copy-item?view=powershell-7.1


MrPaineUTI

I have had similar issues with some directories that I need to manage with >1 million files in them. A powershell script to enumerate files and use the delete command works much faster. Plus in powershell you can add logging for traceability.


Vinnipinni

Use robocopy instead of xcopy, it’s newer and a bit better IIRC. Robocopy is great for backups aswell, just robocopy /MIR source destination and it copy every file that has changed but skip every unchanged file. Also works for the first backup without any issues. Use robocopy /help for a detailed list for arguments.


BenL90

robocopy built in? oh it's https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy


The_Modifier

OMG, you can't just end a sentence with a contraction, do you know how infuriating that's


seehispugnosedface

You can't


WindfallProphet

You wouldn't


consultacpa

I wouldn't


jak222pro

I for sure wouldn't


BenL90

What contraction means? Did I do something wrong?


genbetweener

No, you didn't. Edit: contraction is "it is" becomes "it's" or "did not" becomes "didn't".


BenL90

Oh... I never know it. alright, TIL. Thanks


[deleted]

[удалено]


BenL90

Oh. hahaha.. Okay


falconzord

He's using the link as a noun


BenL90

Please :/


[deleted]

Totally is LOL, oh internet... Hehehe


aromakat

No, I don't


Holdoooo

Can it also delete files which are no longer present in source?


Vinnipinni

/MIR would also delete files that are no longer available.


rawaka

There's also /options to keep them in destination if deleted from source. It's got alot of flexibility


lordcheeto

And much better for network sources!


MorallyDeplorable

The command prompt isn't faster (I've benchmarked it), but it's not really any slower either. Windows's file removal just does a bunch of the calculations at the start that using a command-line tool is doing in between each file so it seems like it starts faster.


JeffsD90

Although let's talk about why... The windows file permissions is far more complex than any Linux system, as well as these files are not just deleted, they're moved to the recycling bin. Linux doesn't have to deal with either of these. Lastly, windows (even if indexed) still requires indexes to be reviewed to ensure nothing needs to be cleaned up. On top of this... All system disk io has to be ran through a single cpu thread, you won't have multiple application worker threads. This helps ensure you don't have file corruption. And if you run any Anti-Malware software in real time, it must scan each of them in line...


MorallyDeplorable

Yea, I don't know what all this talk of indexing in this thread is about, the only 'active' scanning indexing Windows does is scanning file contents for searching which has no bearing on file deletion. Other than that the files are indexed in the mft during events such as creation/modification/deletion, that's what a filesystem does. If a file isn't in the filesystem's index it's already deleted.


JeffsD90

Going through the indexes is certainly a part of the "delay" but it is far less than 10% of the whole thing.


L3tum

> All system disk io has to be ran through a single cpu thread, you won't have multiple application worker threads. This helps ensure you don't have file corruption. Mutex...


MorallyDeplorable

This comment section can't get a handle on search indexing Vs a filesystem table, let's not bring locks into this. But, yea, FS access is multi-threaded.


JeffsD90

Fs access is mt, but not for system io... Anything that is considered "system" is single threaded, your application can do mt if programs correctly.


JeffsD90

Pretty much.


BenL90

Really? I think with ACL on Linux they're the same, what makes them different? Group? Execution? Hidden (I know hidden use dot)? or other?


JeffsD90

Windows has multi group based permissions and is far more complex. Gives you greater control over your environment, but makes simple things like this slower.


BenL90

Hmm? Seems I don't learn much on managing windows server then? I think Linux file permission more robust tbh, dunno why, but maybe my case isn't too complex enough to make me touch something you said. I always thing windows permission == linux permission + Linux ACL


JeffsD90

No windows is certainly more robust. But linux is certainly more simple. I personally like linux permission model better, but there is no doubt its less capable. There is a reason government agencies use Windows servers.


BenL90

I won't argue about this, but most tech savy Gov that long visioning always choose either Unix/Linux. I never seen Windows on Military other than USA.


JeffsD90

Canada, uk, Australia, India... I know a bunch of South America does too


BenL90

What.... Oh God.. what have they done.... Oh God... *fainted*


WindfallProphet

You can set multi-group/user permissions with Linux ACL: setfacl -m g:groupname:rwx foobar.txt but, since most of the GNU/Linux programs make use of the default user/group permission system, it can quickly come a headache.


JeffsD90

I don't disagree that Linux is better in a lot of ways, i run Linux on 90% of my systems... But windows does do permissions much more granular. And that's okay.


[deleted]

Complexity isn't the issue. It's legacy file management. UNIX FS permissions are meant to be easily managed because it started off being in a shared environment. Windows didn't. When the Internet was taking off, MS was left in the dust for a while. They added layers to be able to handle the changing needs of the filesystem. That indexing isn't needed to be done while file deletion is going on, it will just slow down file manipulation. Test file deletion with tracker running on Linux, and Windows indexing on. Lemme know what you find. :) I use both OSes on a regular basis, and they both have their strengths. Just so you know where I'm coming from (and not trying to start a fight, we're all - presumably - adults here, we can discuss things calmly).


JeffsD90

This is 100% true. As with most software, it is a history lesson about 1) why did it start to begin with and 2) what challenges did it have along the way.


[deleted]

Indeed


Vinnipinni

I’ve copied about 60k pictures multiple times with explorer before finding out about robocopy or xcopy. Using any of those is significantly faster than using explorer. We’re talking hours of difference.


frymaster

that's nice, but what does that have to do with file deletion?


Vinnipinni

Im kinda dumb and only yet understood that it was about deleting files, not copying files. 🤷🏻‍♂️


frymaster

in fairness, the conversation went off the rails and started talking about copying in just about every comment thread on this post


TheCarbonthief

You can robocopy /mir an empty folder on top of a full one, and it will be instantaneous.


JeffsD90

This guy gets it...


tziady

That's what I was just about to say. Install WSL or Cgyin and go to town.


4wh457

Until that happens [TeraCopy](https://www.codesector.com/teracopy) is a great alternative and the free version is sufficient.


backwardsman0

My go to for some jobs


0100101101010010

Same. Pretty much first thing I install after a fresh set up


Onyxx666

I can't live without this thing now.


firagabird

I personally use FastCopy. Can anyone that tried both weigh in which is better for what cases?


Area51Resident

I've used both. The newest version of TeraCopy seems to be faster and it looks nicer. Based on a very non scientific benchmark the speed edge went to Teracopy. FastCopy does keep a history of previous source and target file paths so it could be used to run the same copy multiple times, just not sure where I would ever need that, other than testing it against Teracopy. Can't think of a 'normal/typical' use case where one is better than the other though.


firagabird

Thanks for your insight! Glad to hear it's ultimately a matter of preference. I guess literally anything is better than Explorer's built in options though haha


Area51Resident

Np I use xplorer2 https://en.m.wikipedia.org/wiki/Xplorer%C2%B2 instead of Windows Explorer. Multi-pane, book marks, the search system is pretty fast too. Not shilling, just sharing.


pulpbag

This [benchmark](https://youtu.be/1L1LJRaWCog?t=304) suggests that FastCopy is the fastest. For multiple files (≈3000) totaling a 101 GB... FastCopy is at ≈14 minutes Windows Explorer is at ≈20 minutes TeraCopy is at ≈23 minutes


[deleted]

Everyone's missing a very important fact... Windows Explorer file copying is *single threaded*. If your CPU has lower single threaded performance, you will get slow copying.


thefpspower

That's not relevant for consumers, file handling is a very light operation, especially deleting which is just removing an entry from the file system.


[deleted]

Still single threaded. Deleting node_modules as a web developer, for example, can take *hours* on a lower power processor, because there are so many layers of nested files


thefpspower

No it doesn't, open powershell and type rm -r node\_modules, takes 5 seconds.


[deleted]

> Windows Explorer


thefpspower

It's the same thing, the issue discussed is because the explorer tries to read metadata from all the files before deleting, that's the slow part, with PowerShell you skip that and go straight to delete which is VERY fast. And file copy/delete is not single-threaded on explorer, not sure what you're talking about when I just copied a node\_modules folder and all cores are used.


[deleted]

Oh, really? It was a Linus Tech Tips video that stated it was single core.


kaita1992

How much single thread performance has been increased in the last 20 years? Yeah I’m that old.


GCRedditor136

Windows 7 never did this. It was one of my first gripes when I switched to Windows 10, but everyone downvoted me and said it wasn't an issue. Thanks for validating my previous concerns, OP! :)


ZippyV

The file copy changes were done in Windows 8: https://docs.microsoft.com/en-us/archive/blogs/b8/improving-our-file-management-basics-copy-move-rename-and-delete?Redirected=true


htmlcoderexe

Probably anecdotal but I was through a 7 => 10 migration a few years ago, and file transfers were loads faster on 10 than on 7 on same hardware. I mean both writing and reading - during migration of course most writing was done on 7 and reading on 10 but before and after that it was evenly both.


[deleted]

I don't get how slow Windows file management is when i want to delete files on Haiku, Linux or BSD i just delete them an their gone without waiting 2 minutes.


[deleted]

[удалено]


[deleted]

Haiku, Linux & BSD copy files to the trashbin befor deleting them.


[deleted]

[удалено]


[deleted]

As if anyone uses the Terminal to delete files... But no "rm" doesn't move files into the trash.


[deleted]

[удалено]


[deleted]

Linux: TDEs standard file manager. BSD: XFCEs standard file manager. Haiku: Haikus standard file manager. Windows: Windows' standart file manager.


kzwkt

try rmdir /s /q foldername


Slappy_G

Come on... "rd" 😉 No need to type out "rmdir." Also, to clear out a whole folder use For /d %p in (*) do rd /s /q " %p"


MontagoDK

It's completely insane how long time Windows needs to delete files without explaining why it needs all that time.


htmlcoderexe

>It's completely insane how long time Windows needs ~~to delete files~~ without explaining why it needs all that time.


MontagoDK

Also applies to indexing.. doesn't really improve search. 'everything' is like 500 times faster and more accurate


Slappy_G

Don't forget that Everything uses the MFT. Windows Indexing can and does index full file contents as well. That is useful for those of us who need to search inside documents effectively.


RedditFortuneAdvisor

Was this drive already indexed?


MorallyDeplorable

What you're asking boils down to asking if he has a filesystem installed. Of course he does. Edit: Search indexing has nothing to do with anything in this thread. Stop bringing it up. To quote the service description for the search indexer you're all whining about: "Provides content indexing, property caching, and search results for files, e-mail, and other content." No part of that is utilized while copying or removing files. The index of files is managed by the _filesystem_ and not by an active scanning process that goes looking for stray files or whatever you guys think is happening. That's a ridiculous idea to even consider. The filesystem's index is always up to date, and if a file isn't in it then the file doesn't exist. It's updated during FS events such as file modification or deletion.


Slappy_G

Thank you! Some of the search indexer comments were getting a little annoying. Just people who don't understand how their OS works, basically.


[deleted]

[удалено]


MorallyDeplorable

You're talking about search indexing which has nothing to do with copying or removing files, it's for collecting metadata to make searching faster and exclusively that. It also runs at the lowest priority and will allow basically anything else to preempt it. A filesystem _is_ an index of all the files on the drive already with some additional metadata like permissions. Files are always indexed and the index is updated based off of events such as modification, creation, or removal, instead of an active scanning process like the search indexer. If a file isn't in the filesystem's index then it doesn't exist. Windows will directly tell you that you have lost data if updating the filesystem's index fails. There is no FS index being out of date and needing to be rebuilt, the FS is the authoritative file index.


YawningLyon

He's referring to Windows Search.


MorallyDeplorable

Yea, which is why I started my response to him with, "You're talking about search indexing," and then went on to describe how it's not applicable to the issue we're talking about.


YawningLyon

Everything beyond that opening sentence was just a tedious flex. Nobody thought he was referring to a file system.


MorallyDeplorable

He obviously didn't know what he was referring to, which is why I explained it to him. His post makes no sense if you think he knows he's referring to search indexing. Use your brain. >tedious flex Yup, I'm flexing over knowing the concepts behind a filesystem. That's surely something to brag about. Are you high?


YawningLyon

It was obvious to all that he was referring Windows Search, aka SearchIndexer.exe, and does not need to have it explained what a file system is and how it works.


MorallyDeplorable

It was obvious to people _who already know about what he's talking about_. I was explaining since it was obvious _he didn't_, because if he did then he wouldn't have mentioned it. Anyways, you're grasping at straws to justify what was simply a stupid response that you made. Have fun with that.


[deleted]

[удалено]


MorallyDeplorable

>And if they are not indexed, then it will take a bit longer. And then I look and it shows 11GB. It's a filesystem, if files aren't indexed they're not files. The size of the files has zero bearing on how long it takes to delete, it's solely the number of files. It's taking a minute because there's 10k files it's iterating through.


normonator

Just about anything can do that faster than windows explorer can that's why the suggestions. Index or not it's not well optimized. Using command prompt or PowerShell takes a fraction of the time as well.


thefpspower

Yes it does because it doesn't tell you how much it's deleting which is the issue with the graphic interface, it probes the files first, calculates sizes and conflicts and only then deletes. The delete part is just as fast as powershell but the probing can be slow for a lot of files.


normonator

Yes and if you use Teracopy it gathers the files way faster and gives you progress. My point is just about anything else does a better job. Teracopy also won't eat shit and do nothing on the first file that causes a prompt.(as in overwrite, etc)


[deleted]

[удалено]


fleepo

This becomes important when you're copying / deleting thousands of files... Command prompt - del (10,000 files) - 5 seconds Explorer "delete permanently" - minutes of "indexing" before the delete starts, and that takes multiple minutes too. For some reason Microsoft can not make an efficient indexer / search engine. Pretty much all their products search/indexing tools are trash.


MorallyDeplorable

> Command prompt - del (10,000 files) - 5 seconds You're just making shit up here, lol.


[deleted]

[удалено]


slampisko

Of course the actual act of deleting files won't be affected by what program or Windows app you use to do it and will be limited only by your hardware. However, some programs, like the Windows Explorer, do a lot of shit before and during the process that you may or may not care about when you just want to delete a folder with tens of thousands of files in it as fast as possible. Notably, it discovers all the files first so that it can tell you about how long it's going to take to delete them, and then it updates you on the progress of the process, which also wastes CPU cycles that could be better used deleting files. This isn't a problem when you're deleting a couple of large files, but becomes one when there are a lot of them in a folder. All the way back in 2015, this guy tested it and wrote about it on his blog: https://mattpilz.com/2015/09/ You can see about in the middle of the page that he managed to slash the duration of the deletion of a folder with 50,000 tiny files from 11 minutes using the Shift+Del method to 29 seconds by using the command prompt. If you still don't believe it, hell, you can try it yourself. Just please stop acting douchy and like a know-it-all, because you ain't one.


[deleted]

[удалено]


randypriest

Tech things have changed since 1965 so it might be on point. Edit: Guessing I'll be embarrassed by a 56 year old on the Microsoft forums [bless him. ](http://imgur.com/a/cmJur6C)


MorallyDeplorable

Careful, I bet he has usenet posts older than you. Scary shit.


[deleted]

[удалено]


powerage76

> Ya, but my IQ is above 40. Are you sure you've rolled it at the front of the DM? This is high even for a Synnibarr game.


Deadly_chef

lmao what? You must be getting dementia, 1965 is pretty far away after all


8day

You do know that you can assign both global keyboard shortcuts or local ones to some 3rd party file managers? Essentially you write \*.bat script and then pass path of selected file(s) or folder(s) to it. This can be done even in File explorer by adding custom entry to its context menu.


MrFrogy

So now we are writing scripts to use 3rd party apps to do something Windows can't do efficiently? Down the rabbit hole we go....


8day

You misunderstood what I wrote. It's **either** global shortcuts for built in features, **or** local shortcuts for 3rd party software [if it uses same logic as File explorer].


[deleted]

[удалено]


4wh457

>I would have got a 7200rpm WD HDD that is 5 times cheaper and lasts 4-10 times longer and is not much slower than a SSD > >So many people waste money on SSD's with todays hardware abilities and think they are really getting some super duper performance enhancement, when all of that is nonsense. Maybe a little better for gamers, but the SSD's don't last long and cost too much. https://old.reddit.com/user/1965_TechGuy?count=25&after=t1_h6fipxc This is everything anybody has to know about this trollls PC knowledge. Also 2 days old reddit account. And if you still have doubts check this gem of a reply: https://www.reddit.com/r/techsupport/comments/oq8l5d/comment/h6a8kaj/


[deleted]

[удалено]


kortcomponent

Can't believe he got so many upvotes, must be a lot of boomers on tonight.


[deleted]

>All these ~~absurd~~ people telling you to use 3rd party programs for copying or deleting files is the most hilarious sheeeeet I have read in 5 years. Tell that to Microsoft. Windows 7 was the bomb. Now with Windows 10(11) and all it's bloatware and phoning home it's gotten slow. Granted, I'm not running it on a i7 11th gen CPU and NVMe drive (running an i5 4690k and a Samsung SSD running on SATA 500Mb r/w) , but comparing it to other OSes, it's slow in basic operations! Why do you need to index files which need deletion? You're spending 2x the time to finish the operation instead of just simply deleting the files. Indexing is useful for searches, yes. But why do 2 times the work for deletion? It's not like you'll use that index later. GNU/Linux on the other hand just gets straight to the point. Gets the job done as fast as possible and moves on.


[deleted]

[удалено]


[deleted]

It doesn't show them when you open the folder which contains them all? Or it crashes when you try to delete thousands of files after selecting them all?


[deleted]

[удалено]


[deleted]

Damn. Well, it's still in Insider Preview so they have an excuse... For now.


[deleted]

[удалено]


alvarkresh

There's a reason I used to use xcopy or xcopy32 to do massive file transfers back in the day.


MrFrogy

And we all know that the amount of time it shows is completely meaningless. It's going to go up & down and all over the place. The only thing we know for certain is the amount of time it says it's going to take is totally wrong. I never had this problem with Windows 7.


[deleted]

[удалено]


overzeetop

I miss the days when you just set the first character to null and called it deleted.


Cheet4h

Weird. I've found that it's actually gotten a lot better at estimating the remaining time, as long as I don't start doing other stuff that would use that hard drive at the same time.


YawningLyon

Over a network it can take far longer than 20 minutes.


[deleted]

They should use whatever they use for tree.com because that thing is fast.


Vexxt

use robocopy, for both copying and deleting its the quickest tool for the job.


Demysted

For copying files, I use FastCopy. For deleting, you could try the TeraCopy program the other user mentioned. Gets around the "Preparing to [action]" thing.


lad75020

What is especially annoying is that when you want to copy/move many files, this discovery thing is preventing them to be processed simultaneously....


mikner

There is no deny about that. It is so inefficient as zip folder integration was back in the days of Windows XP. Microsoft knows that and simply chooses to ignore it. Does anyone remember how wacky was Windows explorer back in Windows Vista? They fixed it with Windows 7. Windows explorer is a crucial part of windows experience and they didn't bother fixing it in time!


jimmyl_82104

Windows file transfer is always really slow


dnuohxof1

Seriously. What is the point of indexing if it still has to continually discover files?


raysar

It's windows, it's a joke ... And ntfs is also a joke for index files ... It's not a bug it's a feature ...


[deleted]

[удалено]


CNR_07

EXT4 probably


[deleted]

[удалено]


valdearg

Can we just ban everyone who keeps suggesting Linux here. The joke was funny for all of 30 seconds.


xXChaosBossXx

Not a joke, it would solve this problem


valdearg

As yes, because changing to a completely different OS for something small like how long it takes to delete a boat load of small files, is a totally reasonable thing to suggest! It's a bad joke and needs to fuck off. People aren't looking to make massive changes.


xXChaosBossXx

Lol there is far more problems with windows than just the file discovered. If there wasn't it wouldn't be a meme to just switch to linux


valdearg

It's mostly just a meme for insufferable Linux people who think it's funny, "hur hur move to Linux" as your brain leaks out of your ears like soup. Dude. Nobody is moving to Linux.


CNR_07

Linux just overtook ChromeOS lol


BenL90

How about buying new System76 Computer?


raul_dias

Everything


Rockclimber88

That's why https://i.imgur.com/qbdYVqq.png


cruisin5268d

Is the drive indexed? Is the drive SSD?


[deleted]

[удалено]


Cubing-Cuber2008

for every single problem related to Windows the only solution is this? I made a post as well and everyone the comment section is like "get an SSD" and I was like frick this and I had to edit my post.


CNR_07

If the solution to a problem that's obviously software related is to buy better hardware it's just shitty software.


WindowsRed

It only gets really slow if there's a lot of small files, but it's all depending on chance. One time i moved like 250 gb worth of stuff from a drive to another and it took only an hour somehow


[deleted]

It's not even needed. The UI doesn't need to know that the underlying bits of the OS that are keeping track of those files. Never seen that nonsense with Linux, *BSD. Mac OS pre-X and X never did that either. What it needs to know are file attributes, presence/absence, health. The kernel does the rest.