Search Results

Search found 68301 results on 2733 pages for 'file shredding'.

Page 126/2733 | < Previous Page | 122 123 124 125 126 127 128 129 130 131 132 133  | Next Page >

  • Java: constructing a file from a URI?

    - by AP257
    I need to obtain a File object from a URI, working in Java, but keep getting a length of zero - though I know the file size is not zero. I need the File object to pass to another constructor. I'm not sure if it's because I'm constructing it in the wrong way? Here's my code: File videoFile = new File(videoURI.getPath()); if (videoFile == null) { Log.d(LOG_TAG, "File not found!"); return false; } Log.d(LOG_TAG, "about to upload, filepath: " + videoFile.getPath()); Log.d(LOG_TAG, "File length: " + String.valueOf(videoFile.length())); The log output doesn't spit out 'File not found!', and prints a non-null path, but shows a length of 0.

    Read the article

  • Descending list ordered by file modification time

    - by user62367
    How can i generate a list of files in a directory [e.g.: "/mnt/hdd/PUB/"] ordered by the files modification time? [in descending order, the oldest modified file is at the lists end] ls -A -lRt would be great: https://pastebin.com/raw.php?i=AzuSVmrJ but if a file is changed in a directory it lists the full directory...so the pastebined link isn't good [i don't want a list ordered by "directories", i need a "per file" ordered list] os: openwrt..[no perl - not enough space for it :( + no "stat", or "file" command] Thank you!

    Read the article

  • Descending list ordered by file modification time

    - by LanceBaynes
    How can I generate a list of files in a directory [for example, "/mnt/hdd/PUB/"] ordered by the files modification time? [in descending order, the oldest modified file is at the lists end] ls -A -lRt would be great: https://pastebin.com/raw.php?i=AzuSVmrJ But if a file is changed in a directory, it lists the full directory, so the pastebined link isn't good [I don't want a list ordered by "directories", I need a "per file" ordered list] OS: OpenWrt [no Perl - not enough space for it :( + no "stat", or "file" command].

    Read the article

  • PowerShell: Read text, regex sort, write output to file and formatting

    - by Bill Hunter
    I am a Powershell novice and have run into a challenge in reading, sorting, and outputting a csv file. The input csv has no headers, the data is as follows: 05/25/2010,18:48:33,Stop,a1usak,10.128.212.212 05/25/2010,18:48:36,Start,q2uhal,10.136.198.231 05/25/2010,18:48:09,Stop,s0upxb,10.136.198.231 I use the following piping construct to read the file, sort and output to a file: (Get-Content d:\vpnData\u62gvpn2.csv) | %{,[regex]::Split($, ",")} | sort @{Expression={$[3]}},@{Expression={$_[1]}} | out-file d:\vpnData\u62gvpn3.csv The new file is written with the following format: 05/25/2010 07:41:57 Stop a0uaar 10.128.196.160 05/25/2010 12:24:24 Start a0uaar 10.136.199.51 05/25/2010 20:00:56 Stop a0uaar 10.136.199.51 What I would like to see in the output file is a similar format to the original input file with comma dilimiters: 05/25/2010,07:41:57,Stop,a0uaar,10.128.196.160 05/25/2010,12:24:24,Start,a0uaar,10.136.199.51 05/25/2010,20:00:56,Stop,a0uaar,10.136.199.51 But I can't quite seem to get there. I'm almost of the mind that I'll have to write another segment to read the newly produced file and reset its contents to the preferred format for further processing. Thoughts?

    Read the article

  • Removing files with strange names

    - by pythonic metaphor
    Somehow I ended up with a file named "-r". How do I remove it? rm -r doesn't work. I tried 'rm -i `ls -a`' to step through the file names, but it didn't prompt me to delete this one. Edit A very hacky approach was to use python's os.unlink function. That worked, but I'm curious to hear other ways.

    Read the article

  • .bat script doesn't work by using window scheduler

    - by user332640
    i created a .bat script to perform daily folder compression. it is working fine when i double click the .bat file. However, it doesnt work when i include it in window scheduler. Below is the script: rem **************************** rem ** To create back up file ** rem **************************** "C:\Program Files\WinZip\WINZIP32.EXE" -a -r -p "E:\Backup\Daily\sst.zip" "P:\SST\*.*" When i run it via window scheduler, the status is always "running" but nothing is generated. Can someone explain the situation?

    Read the article

  • Connection to VPN using command line

    - by plurby
    I've wrote a simple batch file to connect to a specific VPN connection using RASDIAL rasdial MyVPNConnection but it always returned the error 691 Access denied because username and/or password is invalid on the domain. Remote Access Service (RAS) Error Code List then i tried pointing to my Remote Access Phonebook (Rasphone.pbk) and see what happens rasdial MyVPNConnection /phonebook:%userprofile%\AppData\Roaming\Microsoft\Network\Connections\Pbk\rasphone.pbk and still there was an error 691. I've then unchecked the following but still the same problem was reported when executing my batch file.

    Read the article

  • How do I remove the Never-Ending Dropbox Folder?

    - by KronoS
    I don't know if this is an error with eclipse or dropbox, but I seem to be unable to delete a file folder within my dropbox folder. Somehow, there was a creation of over 8300 file folders, all duplicates of the previous folder. I tried deleting from both command line, and explorer but get the same error: I've also deleted the share from the dropbox website, and it deleted correctly from there, but during the sync from the client (my pc) to the site there is an error: Any ideas of what to do?

    Read the article

  • Executing batch file from sql server job

    - by uzay95
    I want to create backup job on sql server. And i want to execute batch file in job. I just wonder the part of executing batch file from sql job. Do you have any idea? Any help would appreciated. use MyDb go BACKUP DATABASE MyDb TO DISK = 'C:\BackUps\MyDb.bak' WITH differential go -- Call my batch file (which will zip MyDb.bak file)

    Read the article

  • Executing batch file from sql server job

    - by uzay95
    I want to create backup job on sql server. And i want to execute batch file in job. I just wonder the part of executing batch file from sql job. Do you have any idea? Any help would appreciated. use MyDb go BACKUP DATABASE MyDb TO DISK = 'C:\BackUps\MyDb.bak' WITH differential go -- Call my batch file (which will zip MyDb.bak file)

    Read the article

  • Create all directories up to a point?

    - by Stefan Kendall
    I need to be able to build all directories up to and including the directory specified by my File object. For example, suppose I have something like this: File file = new File( "/var/a/b/c/d/" ); But only /var/ exists. I need a method that builds up to d, and I was wondering if there was a method in a java io library somewhere that does this already.

    Read the article

  • Getting the names of all files in a directory with PHP

    - by Greelmo
    For some reason, I keep getting a '1' for the file names with this code: if (is_dir($log_directory)) { if ($handle = opendir($log_directory)) { while($file = readdir($handle) !== FALSE) { $results_array[] = $file; } closedir($handle); } } When I echo each element in $results_array, I get a bunch of '1's, not the name of the file. How do I get the name of the files?

    Read the article

  • How to use an external file for database configuration in EJB environment

    - by bosnic
    I need to have a file for database configuration outside of EAR file of my EJB application. Even if I define a datasource and call it via JNDI, I still have some properties that I want to change, like hibernate.dialect or hibernate.show_sql, for example. I tried using: <property name="hibernate.ejb.cfgfile" value="some-file.xml" /> and it works fine when some-file.xml is in jar file, but how to call it from another location. I tried file:/// but didn´t work. thanks

    Read the article

  • How do you update an Excel file (Data Refresh and update formulas) WITHOUT opening the file?

    - by Alex
    I have an Excel file that want to update and save automatically with out having to open it or manually interact with. Manually, I open the file up and hit data refresh which goes and does a SQL query and then hit F9 for the formulas to update and then I just close/save. (I then would mail the file out to people using a perl script or use SAS JMP to run some numbers/charts and also mail them out. Basically I need to script some things which require the XLS file to be updated.)

    Read the article

  • How to execute home directory shell script file in php

    - by vvr
    How to execute /home/scripts/test.sh file in php Previously i have placed 'test.sh' file in the /usr/bin and calling in my php file like this exec('test.sh ' . escapeshellarg($testString)); But for security reasons i moved .sh file to /home/scripts directory and in my php i am calling like this exec('/home/scripts/test.sh ' . escapeshellarg($testString)); But it is not working now. Please suggest me how to achieve this.

    Read the article

  • How to create a default association for files with no extension

    - by acidzombie24
    I am using http://www.pnotepad.org/ (i wouldnt mind switching to something else if it lightweight and has most/all features i like which i'll check on a app by app basis) When i create a new tab/file and save it unless i write .txt i get a file with no extention. Which makes it hard to open since i cant double click it (i dont think i can tell win7 to set a default app for files with no extension) How do i make pnotepad save with a .txt when non are specified?

    Read the article

  • Creating a binary file from an IntelHex in C#

    - by Allek
    I'm trying to create a binary file from a intelHex file. Iside the intelHex file I have data and address to which I should write the data inside the binary file. IntelHex file looks like that :10010000214601360121470136007EFE09D2190140 :100110002146017EB7C20001FF5F16002148011988 :10012000194E79234623965778239EDA3F01B2CAA7 :100130003F0156702B5E712B722B732146013421C7 :00000001FF So I have 4 lines here with data since the last one tells us thats the end of file. Here is what I'm doing to create the file while (!streamReader.EndOfStream) { string temp = String.Empty; int address = 0; line = streamReader.ReadLine(); // Get address for each data address = Convert.ToInt32(line.Substring(3, 4), 16); // Get data from each line temp = line.Substring(7, 2); if (temp == "01") break; else { temp = line.Substring(9, line.Length - 11); string[] array = new string[(temp.Length / 2)]; int j = 0; for (int i = 0; i < array.Length; ++i) { array[i] = temp[j].ToString() + temp[j + 1].ToString(); j = j + 2; } temp = String.Empty; for (int i = 0; i < array.Length; ++i) { temp = temp + Convert.ToChar(Convert.ToInt32(array[i], 16)); } } binaryWriter.Seek(address, SeekOrigin.Begin); binaryWriter.Write(temp); binaryWriter.Flush(); } Console.WriteLine("Done...\nPress any key to exit..."); The problem here is, that data in binary file in some places is not equal to data from the intelHex file. Looks like there is some random data added to the file and I do not know from where. First time I saw that there is an additional data before the data from the intelHex file. For instance first data line starts with 21, but in binary file I have a number 12 before the 21. I do not know what is wrong here. Hope someone can help me or guide me where I can find some usefull informations about creating binary files in C#

    Read the article

  • How to read a .sqlite file from objective C

    - by Futur
    Hi All, We have a .sqlite file ported with the app, and i wanted to decrypt the file(not just the contents, the whole file), the code we have is able to read a .txt file and i also tried reading the file in binary mode. This isn't working, is there a way to read a .sqlite file from the code. kindly help

    Read the article

  • Program to swap files between drives?

    - by josi
    Has anyone built a program/script to transfer files between 2 hard drives, but like if both are near full....so one copies 1 file over then the other copies the other file, then they delete the files that were copied? Kind of annoying, have a 6tb raid at about 4tb full, then 1 4.5tb basically full, can't really swap them easily....without doing many copies and deletes of files.... Anyone know a way to make them just swap? lol

    Read the article

  • Problem with mod_rewrite rules in .htaccess file

    - by Prashant
    This is my .htaccess file but it is not working. Not any URL is redirected. Help me. RewriteEngine on RewriteRule ^home index.php RewriteRule ^contactus index.php?file=c-contactus RewriteRule ^course_registration index.php?file=c-course_registration RewriteRule ^ncplhpage index.php?file=c-ncplhpage RewriteRule ^scplhpage index.php?file=c-scplhpage RewriteRule ^corporatetra index.php?file=c-corporatetra

    Read the article

  • Convert a CSV file to a XLS file on the linux command line?

    - by Rory
    I'm using Debian Linux and I want to convert a CSV file to an Excel XLS Spreadsheet file. The catdoc package includes the xls2csv command that converts from XLS to CSV. However it doesn't do the reverse. Since I just have a CSV file, I don't care about formatting or anything like that. I'm not worried if it only generates a very simple XLS file, and doesn't support the fancy new versions. Just so long as it's an XLS spreadsheet.

    Read the article

  • Android XML file doesn't save

    - by Shane
    I'm writing a game with LibGDX, and I'm trying to save an XML file, but there's always an exception (java.io.FileNotFoundException: /data/Slugfest/teams/Team1.xml: open failed: ENOENT (No such file or directory)) when saving the file. This code saves the file. public void save() { try { TransformerFactory transformerFactory = TransformerFactory.newInstance(); Transformer transformer = transformerFactory.newTransformer(); DOMSource source = new DOMSource(doc); StreamResult result; if (Gdx.app.getType() == ApplicationType.Android) { result = new StreamResult(new File("/data/Slugfest/teams/" + name + ".xml")); } else { result = new StreamResult(new File(name + ".xml")); } transformer.transform(source, result); Gdx.app.log("Slugfest", "File saved."); } catch (TransformerException tfe) { Gdx.app.log("Slugfest", tfe.getLocalizedMessage()); } } My manifest file includes the WRITE/READ_EXTERNAL_STORAGE permissions, by the way.

    Read the article

  • How to find if the file is a CSV file?

    - by Mithun
    I have a scenario wherein the user uploads a file to the system. The only file that the system understands in a CSV, but the user can upload any type of file eg: jpeg, doc, html. I need to throw an exception if the user uploads anything other than CSV file. Can anybody let me know how can I find if the uploaded file is a CSV file or not?

    Read the article

< Previous Page | 122 123 124 125 126 127 128 129 130 131 132 133  | Next Page >