folder

Creating a folder with the current time as name

Hi, I'm trying to write a simple backup script in Ruby that copies a folder to a specific directory with a timestamp in its name. My code is (simplified): require 'Fileutils.rb' time = Time.now FileUtils.cp_r "C:/somefolder", "D:/somefolder_backup_#{time}" But I keep getting `fu_mkdir': Unknown error - mkdir failed (SystemCallError...

Java - Run Excel using runtime.getRuntime().exec

try { Runtime.getRuntime().exec("excel C:\\file.xls"); } catch (IOException ex) { System.out.println(ex); } Doesn't work. I have to put the full path of excel.exe in order to work. How can I make it generic (For any Excel Folders/Versions)? When I run the same line from OS with Windows Run (Start --> Run) it works. Is there a c...

how to create a directory/folder in app with current date as a name

i want to create a folder in our app local directories ... the file structure i want to create will look like current date year/month/date the root directory of this structure is year inside that current month inside that current date folders .. this way i hav to create the folders... any help appreciated... ...

how to automatic deleting files to a folder in ubuntu?

hello. how to automatic deleting files to a folder in ubuntu?, I need to do a script to delete files from a folder that is filled with the execution of a process on my server. thanks for your answers and hel ...

problem with folder handling with php

Friends, I have a problem............ Help me please........ Am getting the image url from my client, i want to store those images in my local folder. if those images are in less, i will save them manually But they are greater than 5000 images......... Please give some code to down load all the images with PHP ...

Android : Monitoring folder activity

Hi All, I want to create an app which would monitor changes to data in a folder on SD card. For example if a file is put in a folder, as soon as file is copied, my app would send this file to server and delete this file. Is it possible to do this? Thanks. ...

opening a parent folder and highlighting particular child in default file browser using python

I am using following code to open a folder in default file browser. if os.name == 'mac': subprocess.call(('open', folderPath)) elif os.name == 'nt': subprocess.call(('start', folderPath)) elif os.name == 'posix': subprocess.call(('xdg-open', folderPath)) Now the problem is I want to highlight the child folder/file which was sele...

How can I get the size of a folder on SD card in Android?

Is it possible to easily get the size of a folder on the SD card? I use a folder for caching of images, and would like to present the total size of all cached images. Is there a way to this other than iterating over each file? They all reside inside the same folder? ...

cross platform way to explore the containing folder of a file

Hello, is there functionality in java to open the containing folder of a file across any platform. I can accomplish this in windows by running Runtime rt = Runtime.getRuntime(); Process proc = rt.exec("explorer /select,c:\\sampleFile.txt"); You can open a file (if the Desktop api is supported) on any platform with java.awt.Desktop...