Search Results

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

Page 83/2733 | < Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >

  • How to use C to write to flash drive bootsector despite error 'Failed to open file to write.:Permiss

    - by updateraj
    My goal is to manipulate the boot-sector in my flashdrive (volume E:) I am using XP. I am able to read the boot-sector FILE *fp_read = fopen("\\\\.\\E:", "rb"); /* Able to proceed to read boot sector */ however i am not able to open the file to write using fopen in 'wb' mode. FILE *fp_read = fopen("\\\\.\\E:", "wb"); /* Unable to proceed due to Failed to open file to write.:Permission Denied */ The flash-drive is not in use at the moment of execution. Hex-editors are able to manipulated boot sector etc, i believe it possible to do so in c. Any suggestion or insight to overcome the access problem so as to be able to write?

    Read the article

  • Joomla template parameters and params.ini - file becomes unwritable after save.

    - by Moak
    I am using wamp and creating a Joomla template with changeable parameters. initially the message is The parameter file \templates\ssc_2010\params.ini is writable! once I make changes everything works as expected, except now i get the message: The parameter file \templates\ssc_2010\params.ini is unwritable! One solution is to brows to the directory, right click the file, select properties, and uncheck read-only. Again the file is writable but once I modify the parameters again it becomes read only again. I'm quite lazy and would like to prevent this from happening again, I've notice this happening in past projects, but now I have to work a lot with parameters so it becomes quite boring doing manual labor like that :P

    Read the article

  • PowerShell locking File....

    - by Ben
    I am trying to do something very simple in powershell Reading the contents of a file Manipulation some string Saving the modified test back to the file function Replace { $file = Get-Content C:\Path\File.cs $file | foreach {$_ -replace "document.getElementById", "$"} |out-file -filepath C:\Path\File.cs } I have tried Set-Content as well. I always get unautorized exception. I can see the $file has the file content, error is coming while writing the file. Any help is appreciated. Ben

    Read the article

  • Online Image Slideshow Question. File Access Problems.

    - by msandbot
    Hi, I have a flash .swf file that I embed on my webpage. On my server I have the .swf file and multiple image folders. I would like to load every file in one of those folders into the flash slideshow. How should I go about doing this? I tried used Air but it doesn't work on my system as an application so I doubt it will work online. Eventually I plan on making a menu where you can select different folders to display and since they are of different sizes, a foreach loop would be optimal. Keeping a txt file with the number of images is also possible if theres a way to read that in, but I would prefer the more dynamic approach. I am working towards using php for the website if that helps find a solution. Thanks, -Mike Also my slideshow works great online currently but i have to hardcode in the number of files.

    Read the article

  • How to hide download file from bots? [closed]

    - by CJ7
    Possible Duplicate: How to restrict the download of all files in a folder? I want to make a private file available for download but not use username/password protection. I want to put the file into a directory called something like download. How can I ensure: the file does not become part of search engine results, and the file cannot be accessed by bots that might guess the directory name?

    Read the article

  • How can I edit my httpd.conf file?

    - by EmmyS
    I have xampp installed, and need to edit my httpd.conf file to add a virtual host block. If I right-click on the file in Nautilus and open with gedit, I can see all the content, but it's read-only. If I try to open it via terminal, like this: esther@estherLinuxSony:~$ sudo gedit opt/lampp/etc/extra/httpd-vhosts.conf It opens the root version of gedit, but there's no content in the file. How can I edit this file?

    Read the article

  • Lot of "file not found" when using sudo find / -type s

    - by Andrea Moro
    In the attempt to understand why I keep getting the following error error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' while using the command sudo find / -type s the terminal prompted something like this find: ‘/proc/31348/task/31348/fd/5’: No such file or directory find: ‘/proc/31348/task/31348/fdinfo/5’: No such file or directory find: ‘/proc/31348/fd/5’: No such file or directory find: ‘/proc/31348/fdinfo/5’: No such file or directory What does this mean?

    Read the article

  • How to identify doc, ppt, xls files

    - by Shelby. S
    So I was wondering how would you differentiate ppt, xls and doc files from each other in linux regardless of extensions. I tried 'file' but from the looks of it, all of MSOffice files are categorized under the same file type. Similarly I'm having trouble with docx, xlsx and pptx files, since they're essentially all zip files containing a bunch of xml. Thank you for your help! P.S. I also tried a python script importing the magic module, but no go.

    Read the article

  • How does tomcat set its executable file as a windows service?

    - by Wing C. Chen
    Firstly, I am not at all familiar with windows batch file programing. Recently I am curious about how tomcat sets itself as a windows service using a batch file. I downloaded the service.bat file from tomcat 6. However, I still don't understand some part of it. I guess this is the line that the batch actually register the exe file to the OS, is it right? Is there any syntax explanation? "%EXECUTABLE%" //IS//%SERVICE_NAME% --StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap --StartParams start --StopParams stop And is this used to remove the service? "%EXECUTABLE%" //DS//%SERVICE_NAME% And this is the setting of the parameters? "%EXECUTABLE%" //US//%SERVICE_NAME% --JvmOptions "-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endorsed.dirs=%CATALINA_HOME%\endorsed" --StartMode jvm --StopMode jvm Thanks.

    Read the article

  • http_post() variables to php script from SMS message but only append data to text file if certain variable (telephone number) equals a known

    - by user1592162
    All, I have an SMS gateway application running on my server that passes incoming SMS messages to a php script. That script writes the data to a text file. Certain aspects of the message can be extracted as variables - for example: Message content: $msgdata Sender: $originator Time: $receivedtime etc... Using the script below I can easily write the message to a text file but it will write the data of every SMS that comes in. I only want to write to a text file if the $originator variable is a certain telephone number (e.g 07123456321) $date = date("d.m.Y H:i:s"); $msgdata = $_REQUEST["msgdata"]; $myFile3 = "test.txt"; $fh = fopen($myFile3, 'a') or die("can't open file"); $stringData3 = "$date - $msgdata\n"; fwrite($fh, $stringData3); fclose($fh); Your assistance is bery much appreciated. Many thanks in advance.

    Read the article

  • Easy way to lock a file on a remote machine (windows)?

    - by roufamatic
    I've tracked down an error in my logs, and am trying to reproduce it. My theory is that a file sometimes gets locked in a specific folder, and when the application (ASP.NET) tries to delete that folder it hangs. I don't have the application running on my own machine so I'm debugging this on a remote server. But for the life of me, I can't seem to figure out a way to lock a file that prevents it from being deleted by the process. My first thought was to map the network path to a local drive and just leave a command prompt open to that folder. Locally that always fouls up my folder deletes, but apparently SMB is a bit more robust and doesn't grant me a lock. After that I created an infinte loop vbscript in the folder and executed it remotely. The file was deleted out from underneath the executing code. Man! I then tried creating a file on the server in that folder and removing all permissions. That didn't do the trick. I don't have access to the IIS settings so perhaps it's running under a privileged system account. So: what's a program that you know is free and I can quickly use to create an exclusive lock on a file so I can test my delete theory? Like a really, really bad Notepad clone or something. :-)

    Read the article

  • C# - retrieve file path from config file - @ doesn't do it's magic

    - by Bart
    Hi guys, I'm currently working on a web service that retrieves an XML message, archives it and then processes it further. The archive folder is read from the Web.config. This is what the archive method looks like private void Archive(System.Xml.XmlDocument xmlDocument) { try { string directory = System.Configuration.ConfigurationManager.AppSettings.Get("ArchivePath"); ParseMessage(xmlDocument); directory = string.Format(@"{0}\{1}\{2}", @directory, _senderService, DateTime.Now.ToString("MMMyyyy")); System.IO.Directory.CreateDirectory(directory); string Id = _messageID; string senderService = _senderService; xmlDocument.Save(directory + @"\" + DateTime.Now.ToString("yyyyMMdd_") + Id + "_" + System.Guid.NewGuid().ToString().Substring(0, 13) + ".xml"); } The path structure I retrieve is C:\Program Files\Subfolder\Subfolder. In the development, QA, UAT and PRD environments everything works fine. But on another machine I now need to install the web service on (which I cannot debug, unfortunately), the directory string is 'C:Files'. Just to be sure I double checked the .NET version on the different machines (I thought perhaps the usage of @ before a string was version-dependent); all machines use 2.0.50727. Does anyone recognize this problem? Thanks in advance!

    Read the article

  • Java- FileWriter/BufferedWriter - appending to end of a text file?

    - by KP65
    I've done this before once, I'm trying to replicate what I did so far and this is what I've got: try { BufferedWriter writer = new BufferedWriter(new FileWriter("file.P", true)); System.out.println("entered"); if (!(newUserName.isEmpty()) || (newUserPass.isEmpty())){ writer.newLine(); writer.write("hellotest123"); writer.close(); } It seems to find file.P, which is just a txt file, but it doesn't seem to append anything onto it? It enters the code and passes the IF statement fine, but nothing is appended to the text file? I'm slightly stuck!

    Read the article

  • How to know the next temp file to be created in windows?

    - by Mike
    I am by no means a programmer but currently am wondering if an application creates a temp file that windows names. For example the file it creates is tmp001, is there a way i can take that name tmp001 and ask windows to give me the next temp file it would create before it creates it. Thanks, Mike

    Read the article

  • How to load an ImageView from a png file?

    - by Peter vdL
    I take a picture with the camera using Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE ); startActivityForResult( intent, 22 ); When the activity completes, I write the bitmap picture out to a PNG file. java.io.FileOutputStream out = openFileOutput("myfile.png", Context.MODE_PRIVATE); bmp.compress(Bitmap.CompressFormat.PNG, 90, out); That goes OK, and I can see the file is created in my app private data space. I'm having difficulty when I later want to display that image using an ImageView. Can anyone suggest code to do this? If I try to create a File with path separators in, it fails. If I try to create a Uri from a name without separators, that fails. I can open the file OK using: java.io.FileInputStream in = openFileInput("myfile.png"); But that doesn't give me the Uri I need to set an image with iv.setImageURI(u) Summary: I have the picture in a png file in private app data. What's the code to set that into an ImageView? Thanks.

    Read the article

  • How can I asynchronously monitor a file in Perl?

    - by Hussain
    I am wondering if it is possible, and if so how, one could create a perl script that constantly monitors a file/db, and then call a subroutine to perform text processing if the file is changed. I'm pretty sure this would be possible using sockets, but this needs to be used for a webchat application on a site running on a shared host, and I'm not so sure sockets would be allowed on it. The basic idea is: create a listener for a chat file/database when the file is updated with a new message, call a subroutine the called subroutine will send the new message back to the browser to be displayed Thanks in advance.

    Read the article

  • Is there any way to "peek" at a file while it's uploading through HTTP onto a Windows box?

    - by iisystems
    I need to add a file upload function to an ASP.NET website and would like to be able to read a small portion of the file on the server while it's still uploading. A peek or preview type function so I can determine contents and give some feedback to the user while it is still uploading (we're talking about large files here). Is there any way to do this? I'm thinking worst case of writing a custom control which uploads only a fixed number of bytes of the file once chosen and then under the covers starts another upload of the full file. Not totally sure even this is possible, but I'm looking for a more elegant solution anyway... Thanks!

    Read the article

  • Difficulty determining the file type of text database file

    - by Joseph Silvashy
    So the USDA has some weird database of general nutrition facts about food, and well naturally we're going to steal it for use in our app. But anyhow the format of the lines is like the following: ~01001~^~0100~^~Butter, salted~^~BUTTER,WITH SALT~^~~^~~^~Y~^~~^0^~~^6.38^4.27^8.79^3.87 ~01002~^~0100~^~Butter, whipped, with salt~^~BUTTER,WHIPPED,WITH SALT~^~~^~~^~Y~^~~^0^~~^6.38^4.27^8.79^3.87 ~01003~^~0100~^~Butter oil, anhydrous~^~BUTTER OIL,ANHYDROUS~^~~^~~^~Y~^~~^0^~~^6.38^4.27^8.79^3.87 ~01004~^~0100~^~Cheese, blue~^~CHEESE,BLUE~^~~^~~^~Y~^~~^0^~~^6.38^4.27^8.79^3.87 With those odd ~ and ^ separating the values, It also lacks a header row but thats ok, I can figure that out from the other stuff on their site: http://www.ars.usda.gov/Services/docs.htm?docid=8964 Any help would be great! If it matters we're making an open/free API with Ruby to query this data. Additionally I'm having a tough time posing this question so I've made it a community wiki so we can all pitch in!

    Read the article

  • Which is better: many class definitions in the same file or every class definition in a separate file?

    - by Javed Akram
    Which is better: many class definitions in same file or every class definition in separate file? Examples: 1) Many classes in same file. Say, myManyClasses.cs: namespace myPack { class myClass1() { } class myClass2() { } class myClass3() { } . . . } 2) Every class in separate file: myClass1.cs namespace myPack { class myClass1() { } } myClass2.cs namespace myPack { class myClass2() { } } . . .

    Read the article

  • Php efficiency question --> Database call vs. File Write vs. Calling C++ executable

    - by JP19
    Hi, What I wish to achieve is - log all information about each and every visit to every page ofmy website (like ip address, browser, referring page, etc). Now this is easy to do. What I am interested is doing this in a way so as to cause minimum overhead (runtime) in the php scripts. What is the best approach for this efficiency-wise: 1) Log all information to a database table 2) Write to a file (from php directly) 3) Call a C++ executable, that will write this info to a file in parallel [so the script can continue execution without waiting for the file write to occur ...... is this even possible] I may be trying to optimize unnecessarily/prematurely, but still - any thoughts / ideas on this would be appreciated. (I think efficiency of file write/logging can really be a concern if I have say 100 visits per minute...) Thanks & Regards, JP

    Read the article

  • I am unable to upload file to my local host folder in php.

    - by Nauman khan
    Hi, I have the follwing code <form enctype="multipart/form-data" action="upload.php" method="POST"> Please choose a file: <input name="uploaded" type="file" /><br /> <input type="submit" value="Upload" /> </form> <?php $target = "upload/"; $target = $target . basename( $_FILES['uploaded']['name']) ; $ok=1; if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; } else { echo "Sorry, there was a problem uploading your file."; } ?> my page is in http://localhost/nausal/upload.php now I am having the follwing error though i have created a folder in site with name upload. Notice: Undefined index: uploaded in C:\wamp\www\Nausal\upload.php on line 15 Notice: Undefined index: uploaded in C:\wamp\www\Nausal\upload.php on line 17 Sorry, there was a problem uploading your file. Please help me I am very new to php. :(

    Read the article

< Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >