Questions tagged [fileutils]

FileUtils is a File manipulation utility from Apache Commons

FileUtils or org.apache.commons.io.FileUtils is File manipulation utility from Apache Commons

234 questions
0
votes
1 answer

Copying file from Linux to NAS Share with Java (Apache FileUtils FileCopy)

One of the developers here has written some Java code which uses the Apache FileUtils FileCopy command to copy a csv from a host server (linux) to a file share (EMC NAS). The share's setup such that 'Everyone' has 'Full Control' (i.e. to ensure…
JohnLBevan
  • 22,735
  • 13
  • 96
  • 178
0
votes
1 answer

Moving files on external volume with Ruby fileutils?

I've run into what feels like a pretty basic error, but I can't find any documentation about what I'm struggling with. Here's the code: require "fileutils" def new_name(fn, dest = '/Volumes/External/Different\ Sublevel/Renamed', append = '_01') …
Luke Patton
  • 63
  • 1
  • 8
0
votes
2 answers

Windows Free File Utility to copy file with folder structure?

I am looking for free utilities which will copy the file which i want along with the folder structure. Does anyone aware of any file utility? I couldn't find except winzip which is payable. Thanks, Kathir
Kathir
  • 2,733
  • 12
  • 39
  • 67
0
votes
1 answer

Cancel Copy Operation on java

I'm using Apache commons IO for copying files and Directories and I need to add cancel feature. Cancelling the copying operation should leave the files copied as they are till the button is clicked. The following code is used for…
Ofisora
  • 2,707
  • 2
  • 14
  • 23
0
votes
1 answer

How to use FileUtils cp using directory name with spaces in Windows?

I've tried using the suggestions in this thread to no avail: How to use copyfile when there are spaces in the directory name?. To be clear, the directory I'm using is already in double-quotes, and I've tried escaping the spaces, but still get the…
0
votes
2 answers

Issue using IOFileFilter

i have used Apache FileUtils and IOFileFilter to list all files under a folder recursively excluding .svn folders. Here is the code i tried File selectedFolder = new File(path);\\path to folder to list final IOFileFilter dirs = new…
VamsiKrishna
  • 751
  • 6
  • 14
  • 29
0
votes
1 answer

Apache Common FileUtils Read XML file into String

I have stored SOAP XML file into local machine now to validate that XML i need to load that file and extract the XML from SOAP body to validate it. SOAP XML
Ankur Raiyani
  • 1,509
  • 5
  • 21
  • 49
0
votes
1 answer

Rails 3 Heroku app, FileUtils error server side

I am attempting to code a very simple way for a user to add html files to my Heroku app. These files would be saved in ./log for rendering later. I have tested my code locally (in both development and production), but when I attempt to upload a file…
JonahAaron
  • 398
  • 1
  • 9
0
votes
1 answer

Java Apache Commons FileUTIL CopyDirectory Exception

I am trying to use the Apache Common's FileUtil to use CopyDirectory to transfer files onto other disks. I am however getting an error when it comes to transfering My Documents. Also, I don't know why, but when I select a specific path like…
Alan
  • 9,331
  • 14
  • 52
  • 97
0
votes
2 answers

Java FileUtils copy backup directory

i'm using FileUtils of Commons.IO and i'm trying to create a backup script, the simple rules is to copy from source to dest directory all files (and subdirs) that don't exist in dest or if source has a lastmodified date newer than other. I can not…
Tobia
  • 9,165
  • 28
  • 114
  • 219
0
votes
1 answer

Will apache common-io package buffer data before real IO operations?

I want to use apache common-io package, but I am not sure whether there are any buffer strategies in the write/read functions. For example, in FileUtil class there are functions like static void write(File file, CharSequence data); If every…
cheng
  • 2,106
  • 6
  • 28
  • 36
-1
votes
2 answers

Deleting Empty directory in java

Scenario: Path: /users/country/CAN/DateFolder1 more directories /users/country/CAN/DateFolder2 /users/country/CAN/DateFolder3 DateFolder1 and DateFolder2 are empty. I want to delete datefolder when they are empty, but i can't mention the datefolder…
-1
votes
1 answer

Missing a stream to close

I am making a photo sorting program. The FileUtils.moveFile(from, to) works fine most of the time. It does not work when I rotate and copy the meta data of an image. If I rotate and copy the data then close the program, restart the program it…
-1
votes
1 answer

Download percent with FileUtils.copyURLToFile

I'm trying to work on a simple updater for a project I'm working on and for actually downloading the file I'm using Apache's FileUtils.copyURLToFile method. I'm curious on how I can obtain a download percent while the download is happening (eg: 10%,…
Oli
  • 31
  • 4
-1
votes
2 answers

Java 6 - StackOverflowError when trying to copy and paste a file

Java 6 jboss-as-7.1.1.Final I need to copy and paste a file. Using org.apache.commons.io.FileUtils and I tried with the following code, If I invoke sync() from a jsp, getting ... java.lang.StackOverflowError at …
SyAu
  • 1,651
  • 7
  • 25
  • 47
1 2 3
15
16