Search Results

Search found 555 results on 23 pages for 'filenames'.

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

  • iphone reading international filenames

    - by satyam
    Using Objective C, cocoa touch framework. I have few image files in my iphone application. Some file names are in english and some are in japanese like "????????Icon .png" I'm creating views programatically and not using IB. My code is not able to read files with name in japanese language. How can I get this work done.

    Read the article

  • Unicode filenames on windows in ruby

    - by delivarator
    I have a piece of code that looks like this: Dir.new(path).each do |entry| puts entry end The problem comes when I have a file named ???????.txt in the directory that I list. On a Windows 7 machine I get the output: ???????.txt From googling around, properly reading this filename on windows seems to be an impossible task. Any suggestions?

    Read the article

  • How to get absolute paths after vpath matching in make?

    - by Honza
    I have a makefile that depending on some properties sets vpath and generates a list of source files into one variable. I need to run the makefile without compiling anything (the compilation is actually handled by a different makefile) and just see to which real files the filenames get matched depending on the vpath settings.

    Read the article

  • Why suddenly DOS-type hexadecimal file names?

    - by Marvin Nicholson
    One of the fairly recent folders on my XP SATA data drive suddenly shows DOS-type hexadecimal file names (i.e., eight characters with three-character extensions) I deleted them and now my Recycle bin shows them with a tilde (i.e., 194ABE~1.JPG). The images are all valid but the file names I assigned are gone. (The 2-terabyte SATA data drive has no OS, if that matters.) The last time this happened on an IDE drive, I was able to back up all the remaining files just before the drive died. Am I facing the same scenario now with my 2-terabyte SATA data drive? It is only a couple of years old. Should I quickly buy another one and back up 20 years of files to it before my current drive dies?

    Read the article

  • Convert all short (8.3) paths to long paths in the registry?

    - by Mehrdad
    Running FSUtil 8Dot3Name Scan /v /s C: gives you a list of potential 8.3 paths in the registry that are referring to your file system, but is there any tool that can actually convert those paths to long paths in the registry? I do understand this could break some programs, but I have backups so I'd be willing to give it a try. (I tried to make a tool like this myself, but it's harder than it looks, because of false positives and all the varieties of ways the path could be embedded.)

    Read the article

  • Windows Server NTFS volume list file name encodings and any illegal file names

    - by benbradley
    I'm having to deal with a Windows Server (NTFS) file server and our backup application appears to be failing with certain files. According to this https://en.wikipedia.org/wiki/NTFS#Internals NTFS apparently supports file names encoded in UTF-16 but according to their support team, our backup application only supports UTF-8. I'd like to confirm whether this is actually the problem by seeing the file name encoding for myself. The files that are failing appear to be using plain English A-Z letters and other ASCII characters. No accents or non-English letters etc. I suppose even though the letters appear to be plain A-Z the file name could still be encoded in UTF-16. Does anyone know of a utility or script that can recursively go through all files in a directory and show the encoding of the file name? Then I could try renaming to UTF-8 to see if the backup can proceed. I'm not a Windows developer so can't write this up myself. Presumably the encoding of the file name should be stored in the FS somewhere and therefore it should be possible to expose this.

    Read the article

  • On Windows, what filename extensions denote an executable?

    - by Ken
    On Windows, *.exe, *.bat, *.cmd, and *.com all represent programs or shell scripts that can be run, simply by double-clicking them. Are there any other filename extensions that indicate a file is executable? EDIT: When I jump into a new project (or back into an old project!), one of the common things I want to do when looking around is to find out what tools there are. On Unix (which I've used for decades), there's an execute bit, so this is as simple as: find . -executable -type f I figured that on Windows, which seems to have a much more complex mechanism for "is this executable (and how do I execute it)", there would be a relatively small number of file name extensions which would serve roughly the same purpose. For my current project, *.exe *.bat *.cmd is almost certainly sufficient, but I figured I'd ask if there was an authoritative list.

    Read the article

  • Using Windows Explorer, how to find file names starting with a dot (period), in 7 or Vista?

    - by Chris W. Rea
    I've got a MacBook laptop in the house, and when Mac OS X copies files over the network, it often brings along hidden "dot-files" with it. For instance, if I copy "SomeUtility.zip", there will also be copied a hidden ".SomeUtility.zip" file. I consider these OS X dot-files as useless turds of data as far as the rest of my network is concerned, and don't want to leave them on my Windows file server. Let's assume these dot-files will continue to happen. i.e. Think of the issue of getting OS X to stop creating those files, in the first place, to be another question altogether. Rather: How can I use Windows Explorer to find files that begin with a dot / period? I'd like to periodically search my file server and blow them away. I tried searching for files matching ".*" but that yielded – and not unexpectedly – all files and folders. Is there a way to enter more specific search criteria when searching in Windows Explorer? I'm referring to the search box that appears in the upper-right corner of an Explorer window. Please tell me there is a way to escape my query to do what I want? (Failing that, I know I can map a drive letter and drop into a cygwin prompt and use the UNIX 'find' command, but I'd prefer a shiny easy way.)

    Read the article

  • apache url / filename with special characters

    - by Mario Delgado
    I have this url: http://domain.com/wp-content/uploads/2012/10/Hvilke-vilkår-følger-med-når-du-bestiller-nyt-bredbånd.png If I ftp/ssh or just browse to that folder (apache index feature), I see the file Hvilke-vilkår-følger-med-når-du-bestiller-nyt-bredbånd.png If I click on the link from the apache index, I can see the file, however, if I copy the URL and try to browse to it directly, I get the error: The requested URL /wp-content/uploads/2012/10/Hvilke-vilkÃ¥r-følger-med-nÃ¥r-du-bestiller-nyt-bredbÃ¥nd.png was not found on this server. Also my error log says: File does not exist: /wp-content/uploads/2012/10/Hvilke-vilk\xc3\xa5r-f\xc3\xb8lger-med-n\xc3\xa5r-du-bestiller-nyt-bredb\xc3\xa5nd.png

    Read the article

  • Rename file in XP, only select file name, but show file extension.

    - by RasmusWriedtLarsen
    So if I have a file called: test.txt and I want to rename it, there are two options (depending on the Show already known file extension option): 1) ON: it selects everything (test.txt), meaning I have to manually select "test" and replace it with the new filename. (which is irritating) 2) OFF: Only "test" is editable (and visible). Problem is that I frequently need to change the file extension of a file, but if the option is turned on, it's a pain to change the file name. I know that in Win7 it does something smart: It only selects the file name when you press rename[F2], but also lets you edit the file extension. Is there a way to accomplish this?

    Read the article

  • How to remove leading whitespace from file and folder names?

    - by timoto
    How to remove leading whitespace from file and folder names? (I'm running OS X 10.6 Snow Leopard.) As provided below by @Lri I was able to remove trailing whitespace using this: #!/bin/bash IFS=$'\n' for d in {1..9}; do find ~/Desktop -name '* ' -depth $d | while read f; do mv "$f" "$(sed 's/ *$//' <<< "$f")" done done Now I'm trying to remove leading whitespace with this: #!/bin/bash IFS=$'\n' for d in {1..9}; do find ~/Desktop -name '* ' -depth $d | while read f; do mv "$f" "$(sed 's/^ *//;s/ *$//' <<< "$f")" done done but it doesn't work. What am I doing wrong?

    Read the article

  • Weird files in User folder

    - by Vervious
    In my user folder (C:/Users/myAccount/) theres a set of interesting hidden files that I've never seen before (right now it's a fresh install of Windows 7 Ultimate). These are: NTUSER.DAT, ntuser.dat.LOG1, ntuser.dat.LOG2, and NTUSER.DAT(whole chain of numbers and letters).TM.bif, NTUSER.DAT(whole chain of numbers and letters).TMContaineretcetc.regtrans-ms, and another similar one. When I try to delete them, it says the system is using them. I've never seen these files before. Are they ok to delete? Or should I leave them in my home folder? I always keep "Show hidden files" as well as "Show System files" checked, since I prefer being able to see all the files on my computer. If I shouldn't delete them, is there at least a way to tidy them up a bit? Thanks.

    Read the article

  • What are the practical limits on file extension name lengths?

    - by GorillaSandwich
    I started using DOS back before Windows, and ever since have taken it for granted that Every file has a file extension, like .txt, .jpg, etc That extension is always short (usually 3 letters) I learned early that the extension is basically just a hint to the OS as to what the content type is. Eventually I got exposed to Mac and Linux, files with no extensions, etc. And of course I've seen shorter extensions, like .rb and .py. I just noticed that markdown-formatted files can have the extension .markdown, and it made me wonder - how long can that extension be? If I make it .mycrazylongextensiontypewoohoo, will certain operating systems or programs choke on the file? Are extension names generally short just for convenience, or is this based on some limitation, legacy or current?

    Read the article

  • Removing file with strange characters in filename in OS X

    - by SiggyF
    After a memory error in my program, I am stuck with a file with a strange filename. It's proving quite resistant to all normal methods to remove files with strange names. The filename is: %8BUȅ҉%95d%F8%FF%FF\x0f%8E%8F%FD%FF%FF%8B%B5T%F8%FF%FF%8B%85\%F8%FF%FF\x03%85x%F8%FF%FF%8B%95D%F8%FF%FF%8B%BD%9C%F8%FF%FF%8D\x04%86%8B%B5@%F8%FF%FF%89%85%90%F8%FF%FF%8B%85X%F8%FF%FF\x03%85%9C%F8%FF%FF%C1%E7\x02%8B%8Dx I tried the following: rm * - "No such file or directory" rm -- filename - "No such file or directory" rm "filename" - "No such file or directory" ls -i to get the inode number - "No such file or directory" stat filename - "No such file or directory" zip the directory where the file is in - error occured while adding "" to the archive. delete directory in finder - error -43 in python: os.unlink(os.listdir(u'.')[0]) - OSError No such file or directory find . -type f -exec rm {} \; - "No such file or directory" checked for locks on the file with lsof - no locks All these attempts result in a file (long filename here) not found error, or error -43. Even the ls -i. I couldn't find anymore options, so before reformatting or repairing my filesystem (fsck might help) I thought maybe there is something I missed. I wrote this small c program to get the inode: #include <stdio.h> #include <stddef.h> #include <sys/types.h> int main(void) { DIR *dp; struct dirent *ep; dp = opendir ("./"); if (dp != NULL) { while (ep = readdir (dp)) { printf("d_ino=%ld, ", (unsigned long) ep->d_ino); printf("d_name=%s.\n", ep->d_name); } (void) closedir (dp); } else perror ("Couldn't open the directory"); return 0; } That works. I now have the inode, but the normal find -inum inode -exec rm '{}' \; doesn't work. I think I have to use the clri now.

    Read the article

  • How to force Windows XP to rename a file with a special character?

    - by codeLes
    I have a song that Windows can't play because there is a question mark in the name of the file. "Where Have All the Cowboys Gone?.ogg" // as an example So I try to rename it and Windows complains whether I try it in Explorer or from command prompt. Error I get when trying to copy, rename, or move is: The Filename, directory name, or volume label syntax is incorrect Is there a Windows way to force a rename in this case? Update I'll keep an eye on this question, but after 13 answers and many attempts (aside form 3rd party solutions) it seems that Windows can't do this (or at least my windows can't, no short names). So I'm accepting the answer which was my original solution anyway of using Linux. It would be nice to see Windows handle this somehow, so don't stop just because I've accepted this answer, the question still stands!

    Read the article

  • Escaping %’s in file-/folder-names at the command-line

    - by Synetech
    Does anybody of a way to access files and directories that have a % in their name (which is valid) from the command-line? Specifically, if there are two %’s and the text between them happens to correspond to an environment variable. For example, if there is a file called C:\blah\%temp%.txt or a folder called C:\Program Files\%temp%\, none of the following will work because the variable gets expanded: > dir "c:\blah\%temp%.txt" > dir "c:\blah\^%temp^%.txt" > dir "c:\blah\%%temp%%.txt" > dir "c:\blah\\%temp\%.txt" > dir "c:\program files\%temp%" > dir "c:\program files\^%temp^%" > dir "c:\program files\%%temp%%" > dir "c:\program files\\%temp\%" Using wildcards will work, but does not uniquely select the file/folder and may include others: > dir "c:\blah\?temp?.txt"        (also shows ztempz.temp, 1tempa.txt, etc.) > dir "c:\program files\?temp?"   (likewise) (This is frustrating because every now and then—usually when Explorer is restarted for whatever reason—the environment variables stop expanding and some places where they are used end up creating files or directories with the environment variable in it. For example, because I configured Chromium to store its cache in a subdirectory of %temp%, if the variable expands, it is fine, but when it doesn’t, Chromium creates a directory called %temp% under its own directory and stores the cache—which can get large—there. I want to add a line to my temp-/junk-file cleaning script to automatically delete that folder if it exists, but I cannot figure out how to access it from the command-line without resorting to wildcards.)

    Read the article

  • DOS Batch file - Copy file based on filename elements

    - by user1848356
    I need to sort alot of files based on their filename. I would like to use a batch file to do it. I do know what I want but I am not sure of the correct syntax. Example of filenames I work with: (They are all in the same directory originally) 2012_W34_Sales_Store001.pdf 2012_W34_Sales_Store002.pdf 2012_W34_Sales_Store003.pdf 2012_November_Sales_Store001.pdf 2012_November_Sales_Store002.pdf 2012_November_Sales_Store003.pdf I would like to extract the information that are located between the "_" signs and put them into a different variable each time. The lenght of the informations contained between the _ signs will be different everytime. Example: var1="2012" var2="W34" (or November) var3="Sales" var4="001" If I am able to do this, I could then copy the files to the appropriate directory using move %var1%_%var2%_%var3%_%var4%.pdf z:\%var3%\%var4%\%var1%\%var2% It would need to loop because I have Store001 to Store050. Also, there are not only Sales report, many others are available. I hope I am clear. Please help me realize this batchfile!

    Read the article

  • Safely escaping and reading back a file path in ruby

    - by user336851
    I need to save a few informations about some files. Nothing too fancy so I thought I would go with a simple one line per item text file. Something like this : # write io.print "%i %s %s\n" % [File.mtime(fname), fname, Digest::SHA1.file(fname).hexdigest] # read io.each do |line| mtime, name, hash = line.scanf "%i %s %s" end Of course this doesn't work because a file name can contain spaces (breaking scanf) and line breaks (breaking IO#each). The line break problem can be avoided by dropping the use of each and going with a bunch of gets(' ') while not io.eof? mtime = Time.at(io.gets(" ").to_i) name = io.gets " " hash = io.gets "\n" end Dealing with spaces in the names is another matter. Now we need to do some escaping. note : I like space as a record delimiter but I'd have no issue changing it for one easier to use. In the case of filenames though, the only one that could help is ascii nul "\0" but a nul delimited file isn't really a text file anymore... I initially had a wall of text detailing the iterations of my struggle to make a correct escaping function and its reciprocal but it was just boring and not really useful. I'll just give you the final result: def write_name(io, val) io << val.gsub(/([\\ ])/, "\\\\\\1") # yes that' 6 backslashes ! end def read_name(io) name, continued = "", true while continued continued = false name += io.gets(' ').gsub(/\\(.)/) do |c| if c=="\\\\" "\\" elsif c=="\\ " continued=true " " else raise "unexpected backslash escape : %p (%s %i)" % [c, io.path, io.pos] end end end return name.chomp(' ') end I'm not happy at all with read_name. Way too long and akward, I feel it shouldn't be that hard. While trying to make this work I tried to come up with other ways : the bittorrent encoded / php serialize way : prefix the file name with the length of the name then just io.read(name_len.to_i). It works but it's a real pita to edit the file by hand. At this point we're halfway to a binary format. String#inspect : This one looks expressly made for that purpose ! Except it seems like the only way to get the value back is through eval. I hate the idea of eval-ing a string I didn't generate from trusted data. So. Opinions ? Isn't there some lib which can do all this ? Am I missing something obvious ? How would you do that ?

    Read the article

  • [PHP] Sanitizing strings to make them URL and filename safe?

    - by Xeoncross
    I am trying to come up with a function that does a good job of sanitizing certain strings so that they are safe to use in the URL (like a post slug) and also safe to use as file names. For example, when someone uploads a file I want to make sure that I remove all dangerous characters from the name. So far I have come up with the following function which I hope solves this problem and also allows foreign UTF-8 data also. /** * Convert a string to the file/URL safe "slug" form * * @param string $string the string to clean * @param bool $is_filename TRUE will allow additional filename characters * @return string */ function sanitize($string = '', $is_filename = FALSE) { // Replace all weird characters with dashes preg_replace('/[^\w\-'. ($is_filename ? '*~_\.' : ''). ']+/u', '-', $string); // Only allow one dash separator at a time (and make string lowercase) return mb_strtolower(preg_replace('/--+/u', '-', $string), 'UTF-8'); } Does anyone have any tricky sample data I can run against this - or know of a better way to safeguard our apps from bad names?

    Read the article

  • This regx does not work only in Chrome

    - by Deeptechtons
    Hi i just put up a validation function in jScript to validate filename in fileupload control[input type file]. The function seems to work fine in FF and sometimes in ie but never in Chrome. Basically the function tests if File name is atleast 1 char upto 25 characters long.Contains only valid characters,numbers [no spaces] and are of file types in the list. Could you throw some light on this function validate(Uploadelem) { var objRgx = new RegExp(/^[\w]{1,25}\.*\.(jpg|gif|png|jpeg|doc|docx|pdf|txt|rtf)$/); objRgx.ignoreCase = true; if (objRgx.test(Uploadelem.value)) { document.getElementById('moreUploadsLink').style.display = 'block'; } else { document.getElementById('moreUploadsLink').style.display = 'none'; } }

    Read the article

  • What should I name my files with generic class definitions?

    - by Tomas Lycken
    I'm writing a couple of classes that all have generic type arguments, but I need to overload the classes because I need a different number of arguments in different scenarios. Basically, I have public class MyGenericClass<T> { ... } public class MyGenericClass<T, K> { ... } public class MyGenericClass<T, K, L> { ... } // it could go on forever, but it won't... I want them all in the same namespace, but in one source file per class. What should I name the files? Is there a best practice?

    Read the article

  • Vaadin: Downloaded file has whole path as file name

    - by javydreamercsw
    I have a download action implemented on my Vaadin application but for some reason the downloaded file has the original file's full path as the file name. Any idea? You can see the code on this post. Edit: Here's the important part of the code: package com.bluecubs.xinco.core.server.vaadin; import com.bluecubs.xinco.core.server.XincoConfigSingletonServer; import com.vaadin.Application; import com.vaadin.terminal.DownloadStream; import com.vaadin.terminal.FileResource; import java.io.*; import java.net.URLEncoder; import java.util.UUID; import java.util.logging.Level; import java.util.logging.Logger; import java.util.zip.CRC32; import java.util.zip.CheckedInputStream; /** * * @author Javier A. Ortiz Bultrón<[email protected]> */ public class FileDownloadResource extends FileResource { private final String fileName; private File download; private File newFile; public FileDownloadResource(File sourceFile, String fileName, Application application) { super(sourceFile, application); this.fileName = fileName; } protected void cleanup() { if (newFile != null && newFile.exists()) { newFile.delete(); } if (download != null && download.exists() && download.listFiles().length == 0) { download.delete(); } } @Override public DownloadStream getStream() { try { //Copy file to directory for downloading InputStream in = new CheckedInputStream(new FileInputStream(getSourceFile()), new CRC32()); download = new File(XincoConfigSingletonServer.getInstance().FileRepositoryPath + System.getProperty("file.separator") + UUID.randomUUID().toString()); newFile = new File(download.getAbsolutePath() + System.getProperty("file.separator") + fileName); download.mkdirs(); OutputStream out = new FileOutputStream(newFile); newFile.deleteOnExit(); download.deleteOnExit(); byte[] buf = new byte[1024]; int len; while ((len = in.read(buf)) > 0) { out.write(buf, 0, len); } in.close(); out.close(); final DownloadStream ds = new DownloadStream( new FileInputStream(newFile), getMIMEType(), fileName); ds.setParameter("Content-Disposition", "attachment; filename=" + URLEncoder.encode(fileName, "utf-8")); ds.setCacheTime(getCacheTime()); return ds; } catch (final FileNotFoundException ex) { Logger.getLogger(FileDownloadResource.class.getName()).log(Level.SEVERE, null, ex); return null; } catch (IOException ex) { Logger.getLogger(FileDownloadResource.class.getName()).log(Level.SEVERE, null, ex); return null; } } } I already debugged and verified that fileName only contains the file's name not the whole path.

    Read the article

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