Use this tag for reviews of code that performs file system operations, such as creating, deleting, renaming, moving, copying, reading, and writing files.
-2
votes
1answer
81 views
Mapping phone numbers to names [on hold]
Problem description:
You are given a phone book that consists of your friend's names and
their phone number. After that you will be given your friend's name
as query. For each query, print the ...
4
votes
1answer
56 views
Uploading data to Google Drive
I have created a project which uploads data from my local storage to my Google Drive account using the Google Drive API.
You can read about how to run it on its Github repository.
The main script ...
7
votes
3answers
41 views
Accessing files in a child directory in Python 2.7.x
I have written the below script for use in Python 2.7.x. In essence, I want the script to access a folder contained within the directory the script is and then add all files contained within to a ...
2
votes
0answers
107 views
Algorithm to categorize episode-file names efficiently
I'm trying to categorize file names of anime episodes (for now) into appropriate title based categories. The algorithm works fine for files with straightforward names but not for others, and sometimes ...
-4
votes
0answers
15 views
No such file or directory c++ [closed]
Compiler all time give me error "No such file or directory". I tried #inlcude and #include"PostNet.h" but doesn't work
Any suggestion, comment what should I do :)
Code is below
...
6
votes
2answers
38 views
Implementation of the ls command with several options - follow-up 2
I've made more improvements from previous iterations and my own, including:
Added the -n flag (print owner and group IDs instead of names)
Eliminated some ...
5
votes
0answers
30 views
Folder watching in Go
To try and track down a troublesome AS400 bug, my company wants me to keep track of the order in which files are put into a folder. I spent an hour whipping something up in Go, but I'm still pretty ...
11
votes
2answers
66 views
Implementation of the ls command with several options - follow-up
I've made vast improvements to my previous ls implementation, including:
Added new flags:
-g (omit owner listing)
...
15
votes
3answers
137 views
Implementation of the ls command with several options
As part of a past assignment, I've expanded on this implementation of ls to have more options available, including non-standard ones.
It currently supports these ...
5
votes
4answers
88 views
Writing to a newly created file, with support for unit testing
When now increasingly making code unit testable, I notice that code gets bloated, only to get dependencies out. A simple file operation, like saving a file, and, if a file with the name already ...
10
votes
2answers
92 views
Simulation of image transfer over noisy channel
Following this question, I've tried to rewrite some core methods to avoid using String for bit operations, and I ended up using ...
11
votes
4answers
150 views
Get Workbook Method(s)
I'm re-writing my Module of standard methods. These 3 are used to retrieve Workbooks as Workbook Objects. The standard I'm aiming for here is "Third-party Library/Add-in". So:
Do these functions ...
4
votes
2answers
61 views
Extracting files and directories from a provided list into separate lists
This code gets a list of all files and directories from a specific location. Thes code below works.
...
9
votes
2answers
52 views
Find missing web-pages
You are writing your web-page and relentlessly adding links, as you think that links are the best thing a web-page can offer.
The fact is that you write links even to pages that do not exist just ...
8
votes
1answer
107 views
Simulating image transfer over noisy channel with a repetition code
I need to write a software in JAVA which allows me to simulate the transfer of some images over a noisy channel while adding redundancy with a repetition code
.
Before going into code details and ...
7
votes
3answers
144 views
MP3 Vote Collator - Final
Here is the completed code for my first Python project, for which I received some help and feedback here: Collate votes on MP3 files to list them by popularity
Seeing as there have been considerable ...
8
votes
3answers
160 views
Collate votes on MP3 files to list them by popularity
For my first Python project, I decided to create a script that would automatically collate MP3 files into a music countdown. I wanted to 'learn by doing', so I dived straight in and used the Python ...
5
votes
2answers
89 views
Account registration system for a quiz game
As part of a school project for ICT lessons, our class has been required to write a quiz program following certain criteria that has been set. The first part of this is a program that handles the ...
6
votes
2answers
104 views
Using PHP to create a file structure
I am using PHP to create a file structure in which to store XLSX files, for this I have created this class:
...
5
votes
1answer
39 views
Batch renames file's extension in a given directory with Python
Arguments:
The directory in which you would like to change file extensions
Old file extension
And what the new extension should be
Example:
...
4
votes
2answers
72 views
Adding “_old” to a file name
This is a trivial problem. The reason I'm here is to get a better idea of how to use Java's numerous APIs for working with files, folders, and paths. I'm hoping this specific example will help.
...
4
votes
2answers
59 views
Watch a directory and insert new entries into database - Follow up
This is now my new code implementing the recommendations from my previous question.
...
2
votes
1answer
51 views
Getting all files names and paths
I'm trying to get all files paths and names to index them in my database for faster search in future. I have used multithreading and parallel classes, but I'm couldn't get the performance I expected. ...
3
votes
1answer
37 views
Copy first n lines of each file in a directory
In an attempt to learn Haskell, I've built this - it accepts a number n, a source directory, and a sink directory (ending with /) copies n lines from each file in ...
3
votes
2answers
59 views
Watch a directory and insert new entries into database
This program's main function is to:
Watch a directory.
If there are new files, insert those as entries into the database.
Delete the files from the directory.
My below code runs well, but I want ...
2
votes
1answer
65 views
Tagging the directories and switching between them by tags
MOTIVATION
I have this small software package that allow users to maintain a simple text file that looks like
tag1 path1
tag2 path2
.
.
.
For example, it may ...
4
votes
2answers
41 views
Speeding Up BufferedWriter
Are there any possible speed improvements I can make to the following method. It takes a JDBC ResultSet and breaks it into several CSV files:
...
0
votes
0answers
15 views
XSLT to recurse web server and build sitemap.xml
Code runs and produces valid sitemaps. Questions in the code comments.
...
8
votes
2answers
184 views
Simple extractor for Quake-2 PAK archives
I was fiddling with the source code of Quake-2 today and at some point wanted to extract files from the .pak archives used by the game. Since I couldn't find any ...
4
votes
2answers
52 views
m3u file collector
I'm new to Python and wrote this code for collecting all files in an m3u (playlist) file and copying them into a directory.
...
3
votes
1answer
48 views
Renaming video files based on episode title lookup
I'm new to F#, so I've ported an old Python script I have to F#. It scans a directory for files named something like Game.Of.Thrones.S01E02.xvidblahblah.mp4 or ...
3
votes
2answers
64 views
System backup on Linux - follow up
This is a follow-up to System backup on Linux. I've done a lot to my script since I asked my first question and I think I could improve a lot while doing this. The script still does the same, only a ...
6
votes
1answer
138 views
System backup on Linux
I've written this Python script to make regular backups of a Linux server. It works pretty well except that the script sometimes backups files more than one time, which is pretty strange and I don't ...
5
votes
2answers
73 views
Iterate faster through the Android file system and find specific files using java multithreading
I'm trying to extract specific files and visualise them in a list/grid. For that purpose I'm starting a Service to do the background job, and when it finishes it fires an Intent which will be captured ...
-1
votes
2answers
100 views
In VB.NET, does assigning a collection to a variable make a For-Each loop more efficient? [closed]
I have chosen two options for looping through files in a directory. Let me know which one is more efficient (in speed/memory and GC).
Option 1: (collect the file name in an array and loop through it)
...
10
votes
2answers
287 views
Filtering log files from a server
I have made a program in Python to do a filter of log files from a server. What I would like is some guidance on how this code could be optimized, streamlined or 'short-handed' so my 'pythonic' ...
7
votes
2answers
115 views
Get Wikimedia attributions for images
We are using images from Wikimedia commons for some of Cardshifter's game artwork. I selected some art for each card to make a .jpg file to use in the game clients, ...
4
votes
3answers
92 views
Analyze very large sets of engineering data from Excel files
I am an electrical power engineer with some programming skills. My boss asked me to make a program which could analyze very large data, make some calculations and give the result.
The task looks like ...
2
votes
1answer
42 views
Hide/un-hide directory and open directory based on argument
This code checks to make sure a directory is hidden and if not hides it. Then if hidden it will prompt for password and if password matches it will un-hide it. There is also an argument to open ...
7
votes
2answers
117 views
Reverse engineering Darkstone game archives
Reverse engineering old games is something I do every now and then. This time, I took a shot at this old RPG called Darkstone.
The bulk of the game's data is stored in archive files with the ...
4
votes
1answer
65 views
Adding/changing ID3 tags to media files with “artist - title” format
This code puts or changes ID3 tags to media files based on their file names. It assumes the files are in this format:
morbid angel - maze of torment.mp3
The ...
3
votes
1answer
48 views
Loading files or directories based on type
I am building a config class for PHP which initially loads all given config files. To add files, users should be able to provide either a single file or a directory where files can be JSON or PHP.
...
4
votes
0answers
78 views
Simple backup script in Python
Since rsync lacks compression and I'm not a big fan of rdiff, I thought I'd try my own little backup script. Since I'm very ...
8
votes
2answers
93 views
Matching between files and a list of filenames at scale
Given a folder typically containing ~250,000 small (20-100kb) files in HTML format (they open as single-sheet workbooks in Excel) and a list of ~ 1 million filenames, I need to open all the files that ...
4
votes
1answer
55 views
A rename utility in Scala
I made a commandline tool for renaming files, similar to the rename command in Ubuntu. Here is the code:
...
4
votes
1answer
91 views
File deletion takes a long time to delete files
I have a script I need to "duplicate" and modify to allow it to delete certain images based on properties I give this app/script. Currently the script just moves/sorts the images into folders based on ...
10
votes
1answer
222 views
A minimal version control system
I just finished writing a simple version control. You register files using "add", and then "com" will save them inside a directory, with an ID attached to it, same ID for all files. With "rev" it will ...
4
votes
1answer
46 views
Deleting most recent files by parsing filename
I have hundreds of .mp3 files in a single directory of the same naming format, title_YYYY-MM-DD.mp3, with maybe 30 different ...
4
votes
2answers
76 views
Who needs clean configuration? Swapping server.xml
So I'm working on a project that sometimes requires me to switch my server configuration. This is due to some circumstances with database drivers and names that are "too expensive to fix" ...
That ...
0
votes
1answer
40 views
File existence promise
I hate to have to write a custom exists promise every time I need to know if a file exists, so I came up with this. Thoughts?
...