Search Results

Search found 3977 results on 160 pages for 'filename'.

Page 5/160 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Files with illegal filenames [closed]

    - by Josh
    Possible Duplicate: How to force Windows XP to rename a file with a special character? I have a few files whose names have characters such as "?" and ":" that are forbidden by windows. I'm not sure how they managed to get there with these names, since I can't manually create files with these names. They're recovered from an HFS drive, but the tool that recovered them was running under windows and so should have been subject to the same restrictions while creating them, I would think. Anyway... now that they're here, I can open them, but I can't move, copy, rename, or delete them. I want to delete a few of them, but most I want to save and copy to another drive. How might I go about this?

    Read the article

  • Does GPG allow encryption of multiple files using a wild card like *filename*? [on hold]

    - by user47427
    I am trying to automate the encryption of files on a windows server using a .bat file I created. As long as the filename is hardcoded in the .bat file this works. I want to encrypt numerous files using this .bat file but files are not encrypted when I use wildcards in the filename like filename.txt. I've been trying various version of the following command at the DOS prompt to no avail. All attempts have returned syntax for usage. C:\gpg -v --batch -- yes --always-trust -e -r <encryption-key> *part-of-the-file-name* usage: gpg [options] --encrypt [filename] I received the same usage message with this command: C:\gpg -v --batch -- yes --always-trust -e -r --encrypt part-of-the-file-name I tried without the -v and some of the other options and I still received the same message. I have spent hours today searching the internet for an answer and I can't find one anywhere? Please help.

    Read the article

  • Allow user to download file and filename on client defaults to no extension

    - by Andrew
    I want the user to be able to download a file from a page and have the filename extension in the Save As dialog box to be defaulted to nothing. This is the code I'm using: Response.ContentType = "text/plain" Response.AppendHeader("content-disposition", "attachment; filename=FILE") Response.WriteFile("C:\Temp\FILE") Response.End() FILE is the actual file. It is saved on the server without any extension. Currently, the "Save As Type" drop down list in the dialog defaults to "Text Document". How can I make it so that it defaults to "All Files"?

    Read the article

  • php - upload script mkdir saying file already exists when same directory even though different filename

    - by neeko
    my upload script says my file already exists when i try upload even though different filename <?php // Start a session for error reporting session_start(); ?> <?php // Check, if username session is NOT set then this page will jump to login page if (!isset($_SESSION['username'])) { header('Location: index.html'); } // Call our connection file include('config.php'); // Check to see if the type of file uploaded is a valid image type function is_valid_type($file) { // This is an array that holds all the valid image MIME types $valid_types = array("image/jpg", "image/JPG", "image/jpeg", "image/bmp", "image/gif", "image/png"); if (in_array($file['type'], $valid_types)) return 1; return 0; } // Just a short function that prints out the contents of an array in a manner that's easy to read // I used this function during debugging but it serves no purpose at run time for this example function showContents($array) { echo "<pre>"; print_r($array); echo "</pre>"; } // Set some constants // Grab the User ID we sent from our form $user_id = $_SESSION['username']; $category = $_POST['category']; // This variable is the path to the image folder where all the images are going to be stored // Note that there is a trailing forward slash $TARGET_PATH = "img/users/$category/$user_id/"; mkdir($TARGET_PATH, 0755, true); // Get our POSTed variables $fname = $_POST['fname']; $lname = $_POST['lname']; $contact = $_POST['contact']; $price = $_POST['price']; $image = $_FILES['image']; // Build our target path full string. This is where the file will be moved do // i.e. images/picture.jpg $TARGET_PATH .= $image['name']; // Make sure all the fields from the form have inputs if ( $fname == "" || $lname == "" || $image['name'] == "" ) { $_SESSION['error'] = "All fields are required"; header("Location: error.php"); exit; } // Check to make sure that our file is actually an image // You check the file type instead of the extension because the extension can easily be faked if (!is_valid_type($image)) { $_SESSION['error'] = "You must upload a jpeg, gif, or bmp"; header("Location: error.php"); exit; } // Here we check to see if a file with that name already exists // You could get past filename problems by appending a timestamp to the filename and then continuing if (file_exists($TARGET_PATH)) { $_SESSION['error'] = "A file with that name already exists"; header("Location: error.php"); exit; } // Lets attempt to move the file from its temporary directory to its new home if (move_uploaded_file($image['tmp_name'], $TARGET_PATH)) { // NOTE: This is where a lot of people make mistakes. // We are *not* putting the image into the database; we are putting a reference to the file's location on the server $imagename = $image['name']; $sql = "insert into people (price, contact, category, username, fname, lname, expire, filename) values (:price, :contact, :category, :user_id, :fname, :lname, now() + INTERVAL 1 MONTH, :imagename)"; $q = $conn->prepare($sql) or die("failed!"); $q->bindParam(':price', $price, PDO::PARAM_STR); $q->bindParam(':contact', $contact, PDO::PARAM_STR); $q->bindParam(':category', $category, PDO::PARAM_STR); $q->bindParam(':user_id', $user_id, PDO::PARAM_STR); $q->bindParam(':fname', $fname, PDO::PARAM_STR); $q->bindParam(':lname', $lname, PDO::PARAM_STR); $q->bindParam(':imagename', $imagename, PDO::PARAM_STR); $q->execute(); $sql1 = "UPDATE people SET firstname = (SELECT firstname FROM user WHERE username=:user_id1) WHERE username=:user_id2"; $q = $conn->prepare($sql1) or die("failed!"); $q->bindParam(':user_id1', $user_id, PDO::PARAM_STR); $q->bindParam(':user_id2', $user_id, PDO::PARAM_STR); $q->execute(); $sql2 = "UPDATE people SET surname = (SELECT surname FROM user WHERE username=:user_id1) WHERE username=:user_id2"; $q = $conn->prepare($sql2) or die("failed!"); $q->bindParam(':user_id1', $user_id, PDO::PARAM_STR); $q->bindParam(':user_id2', $user_id, PDO::PARAM_STR); $q->execute(); header("Location: search.php"); exit; } else { // A common cause of file moving failures is because of bad permissions on the directory attempting to be written to // Make sure you chmod the directory to be writeable $_SESSION['error'] = "Could not upload file. Check read/write persmissions on the directory"; header("Location: error.php"); exit; } ?>

    Read the article

  • Rails: form input type and getting the filename

    - by Shyam
    Hi, As I am using Ruby on Rails to build an application, which only runs locally, I am lost in the woods (a nuby without a compass). I have a simple MVC application and my view is missing one thing I could really use. I want to select a local file just to retrieve it's filename. I know it's relatively easy to use the form tag helpers for uploading: <%= file_field 'upload', 'datafile' %></p> I wonder how I could get the filename from the selected file, without uploading the file.

    Read the article

  • Access denied exception while accessing process.MainModule.FileName

    - by Manjoor
    I am listing all running processes in system with it full path. My application is running fine in XP but in vista, it gives access denied exception while accessing MainModule.FileName. (Due to UAC, i think). foreach (Process process in Process.GetProcesses()) { sProcess = process.ProcessName; sFullpath = process.MainModule.FileName; .. .. .. } I did not find a solution to deal with UAC. Any clue??

    Read the article

  • How to get only a filename (not full path) into $1, using the PERL, regular expressions

    - by Scott
    I want to keep only the filenames (not full paths) and add the filename to some bbcode. Here is the HTML to be converted: <a href=/path/to/full/image.jpg rel=prettyPhoto><img rel=prettyPhoto src=/path/to/thumb/image.jpg /></a> Notice I cannot have rel="foo" (no double quotes).. Here is what I have in PERL, to perform the conversion: s/\<a href=(.+?)\ rel=prettyPhoto\>\<img rel=prettyPhoto src=(.+?) \/>\<\/a\>/\[box\]$1\[\/box\]/gi; This converts the HTML to: [box]/path/to/image.jpg[/box] But this is what I want as a result: [box]image.jpg[/box] The HTML must remain the same. So how do I change my PERL so that $1 contains only the filename?

    Read the article

  • batch - append either date/time of creation or random to end of filename

    - by Maclovin
    Hi Damsel in distress needing help with a batch-script. I have a bunch of files that one system creates. Either in one of 2 directories, or in the directory above that. The naming is apparently not very important, so It's a bit random. 2 questions for you batch-geniuses out there. a) How can I append date/time of creation to the end of the filename with a batch-script? b) How can I append a random filename (so I make the files unique) with a batch-script? Thanks in advance, dudes and dudettes. Yours sincerely, the Maclovin!

    Read the article

  • PHP include image file with changing filename

    - by Gijigogo
    Hi, I am completely new to PHP so forgive me if this question seems very rudimentry. And thank you in advance. I need to include a jpg that is generated from a webcam on another page. However I need to include only the latest jpg file. Unfortunately the webcam creates a unique filename for each jpg. How can I use include or another function to only include the latest image file? (Typically the filename is something like this 2011011011231101.jpg where it stands for year_month_date_timestamp).

    Read the article

  • Can't copy file with green filename, access denied

    - by Swinders
    Using Windows Explorer under XP I see some of my files have green filenames. When I try and copy one of these files I get an error reporting Access denied. The My pictures folder also appears with green text and I have a large number of photos from family holidays I don't want to loose. I need to backup these files as I'm changing laptop soon. We use SafeBoot to encryt our hard drives but I don't think this is the problem as it allows me to copy other files to removable media with no problems. Has anybody come across this before and how can I resolve this?

    Read the article

  • what does the asterisk mean after a filename if you do ls -l

    - by James.Elsey
    I've done an ls -l inside a directory, and my files are displaying like this : james@nevada:~/development/tools/android-sdk-linux_86/tools$ ll total 9512 drwxr-xr-x 3 james james 4096 2010-05-07 19:48 ./ drwxr-xr-x 6 james james 4096 2010-08-21 20:43 ../ -rwxr-xr-x 1 james james 341773 2010-05-07 19:47 adb* -rwxr-xr-x 1 james james 3636 2010-05-07 19:47 android* -rwxr-xr-x 1 james james 2382 2010-05-07 19:47 apkbuilder* -rwxr-xr-x 1 james james 3265 2010-05-07 19:47 ddms* -rwxr-xr-x 1 james james 89032 2010-05-07 19:47 dmtracedump* -rwxr-xr-x 1 james james 1940 2010-05-07 19:47 draw9patch* -rwxr-xr-x 1 james james 6886136 2010-05-07 19:47 emulator* -rwxr-xr-x 1 james james 478199 2010-05-07 19:47 etc1tool* -rwxr-xr-x 1 james james 1987 2010-05-07 19:47 hierarchyviewer* -rwxr-xr-x 1 james james 23044 2010-05-07 19:47 hprof-conv* -rwxr-xr-x 1 james james 1939 2010-05-07 19:47 layoutopt* drwxr-xr-x 4 james james 4096 2010-05-07 19:48 lib/ -rwxr-xr-x 1 james james 16550 2010-05-07 19:47 mksdcard* -rw-r--r-- 1 james james 205851 2010-05-07 19:48 NOTICE.txt -rw-r--r-- 1 james james 33 2010-05-07 19:47 source.properties -rwxr-xr-x 1 james james 1447936 2010-05-07 19:47 sqlite3* -rwxr-xr-x 1 james james 3044 2010-05-07 19:47 traceview* -rwxr-xr-x 1 james james 187965 2010-05-07 19:47 zipalign* What does that asterisk mean? I'm also unable to run a particular file, as follows : james@nevada:~/development/tools/android-sdk-linux_86/tools$ ./emulator bash: ./emulator: No such file or directory EDIT : I'm trying to get Eclipse to use emulator, but it keeps complaining the files does not exist, yet it is here?

    Read the article

  • Batch script to rename portionof a filename

    - by Rubik'sCube
    I've been trying to make a script that will a file name and change only one word in it. An example would be: projectname.vcproj.domainname.username.user to projectname.vcproj.otherdomainname.username.user I've tried using the if loop to list the directory and set the delimiter to a period but it doesn't seem to be able to identify and change it. I'm using examples of renaming .txt files but it doesn't seem to work, any suggestions?

    Read the article

  • Emacs open files from a filename list

    - by crasic
    I have a largish tex project that is separated into several tex files. Everytime I want to work on it I open emacs and manually C-x C-f all the files that I want to work on. I was wondering if there is a way to open files (from command line) from a file containing a list of filenames, something like filelist.txt: file1.tex file2.tex file3.tex then do cat files | emacs -nw except that emacs doesn't support the command used as it doesn't like that stdin is reassigned. any ideas?

    Read the article

  • Typing filename in standard open file dialog (Windows 7) - file name suggestion

    - by bybor
    When you use standard windows open file dialog and start typing it puts files whose name starts with what you type to drop down list. But on another pc with same Windows 7 it also puts first of them into input box in which you type - like FF does with URLS, allowing you to immediately press Enter (without pressing 'Down' to select file). I don't know why this behavior is different, but I want suggested file name shown in input box. How could it be achieved? Thanks.

    Read the article

  • Rework filename from mod_pagespeed back to normal files

    - by British Sea Turtle
    I am hoping someone can help me with this problem. I am moving to a new server and not using mod_pagespeed any more. However We not that we have lots of external links that link to images on our server using the strange mod_pagespeed filenames. This is not an issue but we do not want to have lots of 404 errors. So I have lots of links like the following : http://www.domain.com/images/150x150xlink.png.pagespeed.ic.pPXw45HSQm.png http://www.domain.com/images/paris_01.gif.pagespeed.ce.vfrkuKUaj0.gif http://www.doamin.com/images/1st2.gif.pagespeed.ce.OUg38q6VbZ.gif How can I redirect them to : http://www.domain.com/images/150x150xlink.png http://www.domain.com/images/paris_01.gif http://www.doamin.com/images/1st2.gif There are thousands of files like this so I am hoping for a simple solution with mod_rewrite, I tried this but it does not work. So any help would be appreciated. RewriteCond %{REQUEST_URI} \.gif\.pagespeed\. [NC] RewriteRule ^(.*?\.gif)\..*\.gif$ $1 [NC,L]

    Read the article

  • Explanation of command to uppercase the first letter of a filename

    - by hazielquake
    I'm trying to learn to rename files with the command line, and after browsing around a lot of pages I finally found a command that uppercases the first letter of a file, but the problem is that I want to understand the meaning of each command. The command is: for i in *; do new=`echo "$i" | sed -e 's/^./\U&/'`; mv "$i" "$new";done I understand the 'for' kinda... but not the 'echo' or '`' and especially the sed command. if someone has a little patience to explain the meaning of each thing that'd be awesome! Thanks!

    Read the article

  • How to pass a filename by drag-and-drop to a shortcut in Windows

    - by Kendall Frey
    I have a program program.exe and a document document.txt, and to open the document, I can drag document.txt onto program.exe. So far so good. Now I want to call it with a command-line parameter -param so that the full command line is program.exe -param document.txt Unfortunately, I can't do this with drag and drop, so I need to fire up cmd and type in the command manually. This takes too long, and I need an easier way. How can I create a shortcut that I can drop the file onto, and have it call the program with the command-line parameter? I tried setting the shortcut to program.exe -param "%1", but that didn't work, because it appeared to pass only the file name, and not the path, and since the current directory was the one with the program and not the one with the document, it couldn't find the document.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >