Use this tag for reviews of code that performs file system operations, such as creating, deleting, renaming, moving, copying, reading, and writing files.

learn more… | top users | synonyms (1)

0
votes
1answer
33 views

Removing folders from my rails app with rake

I'm trying to remove the tmp/letter_opener folder. Everything works fine, just wondering if there's a better way to write it. My next step is to write some tests, ...
5
votes
0answers
36 views

Copy files mentioned in an Excel sheet

Please help me in reducing the time complexity of this code as it is taking a long time to read its Excel input. ...
6
votes
2answers
76 views

Recursive directory copy program

A little while ago, I had to write a little C# application to recover my HDD data (full context on this question) To answer my problem I developed a console application which job was to recursively ...
3
votes
2answers
48 views

Finding duplicates in given list of files

I implemented a simple tool to find duplicate files, by applying the following strategy: Take a list of files and return the sets of duplicates (set of sets) Implement a custom ...
0
votes
0answers
41 views

Resolving the path to a Bash script

I wrote a function to resolve the full path to the current Bash script, and I'm wondering if it's SOLID: ...
3
votes
1answer
83 views

Finding the latest file in a folder

I'm a bit new to Python and sort of learning on my own. I wrote a small function to help me find the latest file in a directory. Taking a step back, it reads a bit janky and I was curious what steps ...
1
vote
2answers
31 views

File presence check for an automated workflow

I am working on a script for an automated workflow. It expects a CSV and a disk image to be present in the directory that is supplied as args.input. I want to check for and handle every possible ...
3
votes
1answer
33 views

Auto move files to a sub folder with Ruby

I started writing a script to handle my file downloads in osx because they quickly pile up and it gets time consuming to do this manually by drag and drop. I am looking forward to get some feedback. ...
4
votes
2answers
84 views

Walking a directory in Haskell

I wrote a function that recursively walks a given directory. ...
2
votes
0answers
24 views

Frequency of words in all files of a directory using Future - Scala

I created a program to get frequency of word in all files in a directory using Future API ...
1
vote
1answer
48 views

File read/write methods

I'm using some simple files for caching and some basic user data. I was first just using file_put_contens and file_get_contents, ...
1
vote
1answer
42 views

Randomly choose a game executable from a folder 2.0

After asking Randomly choose a game executable from a folder, I applied the recommended changes. I also redesigned the program to make use of the MVVM (Model-View-Viewmodel) paradigm, using Prism 6.0. ...
2
votes
2answers
66 views

Bookshelf with Sorting, Categories and File I/O

I've been working on a project originally for school regarding object-oriented design, where I was supposed to write a class for a book and a bookshelf, and then have a driver class to add a couple ...
2
votes
1answer
33 views

List of Files in any Folder - Scala

I have written a code to count the number of files in a folder and if there are any folder inside folder it will count the files in that folder too. ...
2
votes
2answers
39 views

Applescript to change file extensions

I'm new at scripting, but I thought it would be handy to have a script that would change the extensions of selected files in Finder. I run this script from an automator service so that batch changing ...
4
votes
1answer
69 views

Randomly choose a game executable from a folder

I've written a Universal Windows Application which allows you to select a folder and shows the icon and name of a random executable from anywhere in that folder. The intent is to be a Game Roulette, ...
5
votes
1answer
46 views

Uncompress archive, check contents, add missing files, recompress archive

The code looks for the specified .tgz file, if it's not present, it creates it. It looks for files ending in .txt in the cwd and adds them to a list. It decompresses the gzip, checks for the .txt ...
6
votes
2answers
57 views

Perl recursive copy and move functions

I know a module like this already exists on CPAN, but I wanted to write my own simplified version that accepts wildcards in the input. I don't write many Perl modules so I figured I would post the ...
1
vote
1answer
49 views

File system manipulation helper

What do you think about this file system manipulation helper? There is an utility class Folder which I can use to define directory structure of my app: ...
4
votes
1answer
33 views

Reading entire contents of file at a given java.no.file.Path into a String

What I'm wanting to do is create a String readFile(Path filePath, Charset encoding) method, that returns the entire contents of a given file. I'm wanting the ...
4
votes
2answers
349 views

Scanning a directory and listing contents in an HTML file

My program simply accepts the name of a directory from the user, scans said directory and generates an HTML file that lists the contents. Is there any way that this can be improved? ...
1
vote
1answer
37 views

Write binary save file in Python

I'm fixed on the save file format. There are only three types of data: long (NumPy int32 array, independent of platform) ...
5
votes
1answer
66 views

Categorize episode-file names - Follow up

This is a follow up to this question. I have implemented changes to the code as they were suggested in the previous question and have made a few changes of my own. But it has been mentioned that the ...
4
votes
1answer
35 views

Delete orphaned SIDS + change to full control

I need to delete all the orphaned SIDs in the ACLs of about 20 shares (between 100GB/6TB) and change full control of users groups to other permissions (modify or read/execute). I have done this script ...
6
votes
1answer
54 views

Create a folder and perform a SaveAs

I have this code that is working as intended. Since I am still learning VBA and coding, I was wondering if anyone could look at this at let me know if there is another way to write this. This is part ...
-3
votes
1answer
203 views

Mapping phone numbers to names [closed]

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
94 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
50 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 ...
5
votes
1answer
183 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 Show-titles are parsed from an XML file (I got from Anime News Network). EDIT: The passed ...
6
votes
2answers
41 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 ...
6
votes
1answer
57 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
69 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
150 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
137 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
95 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
171 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
68 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
56 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
118 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
145 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
165 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
110 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
107 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
56 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
73 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
62 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
41 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
69 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 ...