541 questions
224
votes
6
answers
568k
views
What's the fastest way to delete a large folder in Windows?
I want to delete a folder that contains thousands of files and folders. If I use Windows Explorer to delete the folder it can take 10-15 minutes (not always, but often). Is there a faster way in ...
80
votes
3
answers
83k
views
How to preserve files original creation date?
I'm moving files on the server from one directory to another using the file manager. Is there a way to preserve file creation date/time (when it was first added to server)? Someone suggested SSH, but ...
68
votes
6
answers
111k
views
How to get list of files with a specific extension in a given folder?
I want to get the file names of all files that have a specific extension in a given folder (and recursively, its subfolders). That is, the file name (and extension), not the full file path. This is ...
66
votes
13
answers
127k
views
Remove all files in a directory
Trying to remove all of the files in a certain directory gives me the follwing error:
OSError: [Errno 2] No such file or directory: '/home/me/test/*'
The code I'm running is:
import os
test = "/...
58
votes
6
answers
16k
views
How do I stop emacs dired mode from opening so many buffers?
When I use dired mode to browse around and find a file I want to open in Emacs, dired opens a new buffer for each directory I visit when looking for the file each time I select a directory with Enter, ...
45
votes
9
answers
25k
views
NSFileManager unique file names
I need a quick and easy way to store files with unique file names on iOS. I need to prefix the file with a string, and then append the generated unique identifier to the end. I was hoping ...
42
votes
4
answers
113k
views
Pandas to_csv() checking for overwrite
When I am analyzing data, I save my dataframes into a csv-file and use pd.to_csv() for that. However, the function (over)writes the new file, without checking whether there exists one with the same ...
32
votes
3
answers
22k
views
How to add js file to my xcode project?
I add some js and css files in my xcode left project tree. but when I build this project , I got the warning : no rule to process file '$(PROJECT_DIR)/js/builder.js' of type sourcecode.javascript for ...
24
votes
5
answers
17k
views
Rename file in Cocoa?
How would I rename a file, keeping the file in the same directory?
I have a string containing a full path to a file, and a string containing a the new filename (and no path), for example:
NSString *...
17
votes
3
answers
23k
views
How to download all files and folder hierarchy from Jupyter Notebook?
If I want to download all of the files and folder hierarchy from Jupyter Notebook as shown in the picture, do you know if there is anyway to do that by simple click other than go to every single file ...
17
votes
1
answer
20k
views
Adding a folder to Xcode project
I have a folder full of files on my iPhone app which I want to use, but Xcode will not let me add folders to the bundle, only its files. I can't do this because I want it to be a bit more convenient, ...
16
votes
10
answers
12k
views
Delete a large number (>100K) of files with c# whilst maintaining performance in a web application?
I am trying to remove a large number of files from a location (by large I mean over 100000), whereby the action is initated from a web page. Obviously I could just use
string[] files = System.IO....
15
votes
6
answers
11k
views
Tips for managing a large number of files?
There are some very good questions here on SO about file management and storing within a large project.
Storing Images in DB - Yea or Nay?
Would you store binary data in database or in file ...
15
votes
5
answers
1k
views
Searching directories for tons of files?
I'm using MSVE, and I have my own tiles I'm displaying in layers on top. Problem is, there's a ton of them, and they're on a network server. In certain directories, there are something on the order of ...
14
votes
4
answers
78k
views
Where does Visual Studio search for txt files when conducting file management operations?
I know this is a noob question, but I've worked with Python before and when you wanted to simply access a .txt file for example, all you had to do was make sure the txt file was in the same directory. ...