Spaces in file names

Hi all,
I was wondering if any of you have run into this problem before. I am using java on an as400 system and there is a space in the file name. When I got to read/write from this file it comes up with a java.io error and says the file doesn't exist. Are there special characters to use for spaces in as400? and if so how would I implement them?
Thanks.

The following works on windows with java 1.4
    java.io.FileOutputStream f = new java.io.FileOutputStream("idiot space.txt");
    java.io.PrintStream ps = new java.io.PrintStream(f);
    ps.println("Line to file with spaces");
    ps.close();
    f.close();
Does the above code run on on your OS?
If no, then your JRE does not support that.
If yes then the character in the file is not a space. Or something else is wrong with your code.
If isn't a space then you might be able redirect the directory listing into a file and then use a hex editor to inspect it. If not that then you can use java.io.File to sequence through the directory and get the files in it. Then print the name of each. Either print it to a file and use a hex editor, or use java to print out the hex value.

Similar Messages

  • 30EA4 Bug - load data, space in file name

    Ubuntu 10.10, JDK 6.24, Sql Developer 3.0 EA4
    If we try to import/load data from .xls file with space in file name, for example "list of cattle.xls" instead "list_of_cattle.xls" it doesn't work. It reports the following error: "Load data into table TABLE_X from file list of cattle.xls. Task failed and load rolled back."
    The only workaround is to rename the file name without spaces.

    same problem when unload - Ver 3 - problem with unload results

  • Workflow scanning - Use space in file name

    I configured two Xerox printers (WC 5875 and W 7835), with latest fimware installed, to scan on a windows shared folder using SMB protocol.The scan is working normally. But users experience this "interface" issue: is not possible to use SPACE character on the file name. The space bar is disabled on the printer screen when users try to modify the standard file name. Is it a software limitation? Is it related with SMB protocol? Is it possible to enable space in file name? Thanks in advance for assistance. CLAUDIO

    If the current firmware begins with 072, upgrade to this one here and the option will be enabled for the space bar. 58xx devices 7830 and 7835 If the current software/Firmware begins with 071, I highly suggest a tech call be placed to have an Altboot no data backup no clone to those levels, the increment that changes from 071-072 is major, it is the change from Connectkey 1.0 to 1.5, and when done, due to extensive changes, does not at all play well with updates or clone files.

  • RMAN having trouble with spaces in file names.

    Hi,
    RMAN is complaining if cmdfile and log file names have space in them (even if they are quoted). This test is done on windows with 10g.
    cmd> rman target / cmdfile rcmd.txt
    This works fine. However,
    cmd> rman target / cmdfile "E:\test dir\rcmd.txt"
    complains about syntax. Something like:
    Argument Value Description
    target quoted-string connect-string for target database
    catalog quoted-string connect-string for recovery catalog
    nocatalog none if specified, then no recovery catalog
    cmdfile quoted-string name of input command file
    log quoted-string name of output message log file
    trace quoted-string name of output debugging message log file
    append none if specified, log is opened in append mode
    debug optional-args activate debugging
    msgno none show RMAN-nnnn prefix for all messages
    send quoted-string send a command to the media manager
    pipe string building block for pipe names
    timeout integer number of seconds to wait for pipe input
    checksyntax none check the command file for syntax errors
    Both single and double quotes (' or ") are accepted for a quoted-string.
    Quotes are not required unless the string contains embedded white-space.
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00552: syntax error in command line arguments
    RMAN-01009: syntax error: found "identifier": expecting one of: "append, at, auxiliary, catalog, cmdfile, clone, checksyntax, debug, log, msglog, mask, msgno, nocatalog, pipe, rcvcat, script, slaxdebug, send, target, timeout, trace"
    RMAN-01008: the bad identifier was: dir
    RMAN-01007: at line 0 column 10 file: command line arguments
    Am I missing something here? Any help is greatly appreciated.
    Thanks,
    Raghu.

    I got response from oracle support folks on this. Looks like two levels of quotes are required to make it work.
    Something like:
    cmd> rman target / cmdfile "'E:\test dir\rcmd.txt'"

  • Publishing w/FTP and spaces in file names

    I read that if I wanted to build a site in iWeb, and then publish to a 'non .mac' server (via FTP) that I'd have to make sure that all of my file and page names didn't have any spaces or special characters in them.
    I went thru all of my files and fixed all of the names, and then re-imported/re-linked using all of the new names.
    When I 'publish to file' though, several of the files revert back to the old names in the newly published folder.
    Anyone have any ideas? Is there a cache, or something, in iWeb that might be causing this?
    Thanks, in advance...

    did you get it fixed? because i had the same thing happen to me. what i did was,
    -open your site on iweb
    -click on the inspector button
    -click on the metrics tab on it(thats second from the right, looks like a little ruler).
    -click on a photo or a graphic. (it will show you the file name in the file info box).
    -for any of the files that have spaces in them opened up a new finder window and go directly to that file.
    -click on the file name and change it so that it has no spaces
    -now draged it directly to the place holder on iweb.
    -the file name should changed in the inspector box.
    -then save it and re-publish it to a folder. in the folder you can look and see if it changed.
    I had to do this with almost all my files. there might be a faster way but this worked for me
    hope this helps.
    ibook G4   Mac OS X (10.3.9)  

  • Quicktime 10 "Save For Web", spaces in file names?

    Maybe I'm overlooking something here, but:
    When using Quicktime 10's "Save for Web" function, it exports movie source files that all have spaces in the filenames (i.e. "Movie - iPhone.m4v" etc)
    Now correct me if I'm wrong, but most web servers DO NOT like having spaces in the filenames, and every time I try to upload them to one of our web servers, I'm getting an error message that says it doesn't like the file.
    Simply removing the spaces from the filenames causes the Quicktime reference movie to stop working, as you might expect.
    Am I missing something here? How would someone possibly get this to work?

    Thanks for the reply - actually it was helpful, and was the final nail in the coffin for Yahoo Webhosting for us. We've been using it for years, and even though it ***** terribly (and I mean TERRIBLY, horribly, painfully), we've stuck with it just because it's been easier to use it than to not switch. But you're exactly right... I tried uploading files to Cachefly with spaces in the name, and bingo, works perfectly.
    Thanks.

  • How to open pdf file in jsp having spaces in file name ?

    hi all,
    i have to open a pdf file in a jsp but some times that pdf file has spaces in the filename
    <a href ="openPdf.jsp?fileName=xyz.pdf">some  pdf file.pdf </a>how to open the pdf file in this case

    more info: java.net.URLEncoder or use response.encodeURL(...) to ensure sessionid is added when cookies are disabled

  • Do I really still have to remove all spaces from file names?

    My staff made a bunch of videos with Camtasia, and now we're integrating them into a web site. Even though I told them "no spaces"... Now, there are hundreds of files with spaces.
    Do I really still need to remove them? I know back in the day the %20 could mess some things up...  None of the links will ever be typed in, so they don't have to be user friendly.
    If I do need to remove them, does anyone know of a tool that will do it for me?
    Thanks!

    Curtis_E_Flush wrote:
    Why not get one of the dozens of FREE file renamers for either Win or Mac and simply use it to "replace" the space with an underscore or hyphen?  It saves you a lot of time, and your files will be W3C compliant
    Because the Camtasia MP4 video files are controlled by an SWF controller, so the file paths in the controller would break.
    To make it complaint, we'd have to rename each of the hundreds of videos (the file renamers would work), then open each master file, find the files lost by changed links, and re-produce.
    Lots and lots of hours.

  • Does ucf.jar handle spaces in file names?

    As far as I can see, it does not:
    humber:zxpdir williamg$ find .
    ./foo
    ./foo/foo bar
    ./foo/foobar
    humber:zxpdir williamg$ java -Djsse.enableSNIExtension=false -jar ../../../adobesigningtoolkit/ucf.jar -package ../foo.zxp -C /Users/williamg/Projects/zxptesting/build/zxpdir/ .
    humber:zxpdir williamg$ unzip -l ../foo.zxp
    Archive:  ../foo.zxp
      Length     Date   Time    Name
           41  08-26-13 19:46   mimetype
            0  08-26-13 19:46   foo/foobar
           41                   2 files
    That appears to indicate that the file “foo/foobar” is being added to the zipfile, but that “foo/foo bar” is not.
    Is this a known bug, … and if so, is there an ETA for it to be fixed?
    As an aside: is there a way to determine the version number of the ucf.jar that I have? “-version” doesn't seem to be available on the command line.

    According to the documentation:
    “If you have created your product using earlier versions of these tools, or the free Creative Suite SDK, or if it is a script or  C++ plug-in, or some combination of these things, you can manually create a manifest MXI file and package your delivery files into a ZXP, using the command-line utility in the Packaging and Signing Toolkit. See the section Packaging Manually”
    (The link points to the section which indicates that the UCF command line tool should be used to create the package.)
    Is this documentation wrong?
    The Packager utility indicates that it supports the following types of content for Photoshop:
    Actions (ATN)
    Brushes (ABR)
    Gradients (GRD)
    Patterns (PAT)
    Scripts (JSX)
    Swatches (ACO, ASE)
    That does not include filter plug-ins (.8bf on Windows, .plugin on Mac), and so it does not apply to my use case.
    (Furthermore, it does not appear to be possible to run the packager tool from the command line, meaning that it is not useful to me since it would be very difficult to integrate it with our build system. Is it possible to run the Packager from the command line?)

  • Saving a file pdf file and the file name appears on a PC with + signs in the name of the file - How do I eliminate the file name coming up with the + signs?

    A pdf file is created from a word document and then posted to our dealer portal.  It allows the dealer to open the pdf file and then either print and/or save off to a hard drive.  The issue is the file name has + signs in between all the words.  Is there a way to eliminate the file names coming up with the plus signs?  It is not being saved that way.  Any help you can provide would be appreciated.

    Use a proper file name for the WORD document. MS decided several years ago to allow spaces, but that is not standard and is likely what the issue is. A good alternative is to replace spaces in file names with underbars, "_".

  • IWeb and uploading jpegs with spaces in their names

    I have created a site with about 100 jpegs that I wish to load up to a server other than ".Mac". Some jpegs have spaces in their names, so "Fetch" will not upload them. I deleted the spaces from their names and loaded the jpegs back into the site and saved and published to a folder. However, the resulting "Site"folder shows the jpegs still have spaces in their names, even though I removed them from the name of the jpeg. IWeb must be getting the name from some internal tag or something. For example, I had a jpeg called "Billie Holiday.jpg" I changed the name to "BillieH.jpg", but when I publish the site to a folder, the jpeg still shows up as "Billie Holiday.jpg" and therefore I cant upload it using "Fetch". Where is iWeb getting the names of the jpegs from, and how do I remove the spaces? Or, does anybody know of an application that can upload files (ftp) with spaces in their names?
    Thanks,
    Mitch

    However, the resulting
    "Site"folder shows the jpegs still have spaces in
    their names, even though I removed them from the name
    of the jpeg.
    Very strange. You might try renaming the site with Inspector to something else than Site and republishing, to guarantee you have a totally new set of files.
    Or, does
    anybody know of an application that can upload files
    (ftp) with spaces in their names?
    It's not the ftp program. You can't have spaces in file names on most web servers, they won't accept the files.

  • Encore CS4 Flash output - server doesn't like file names

    Apparently my ftp server for my web site does not like files with spaces in the names, but Encore seems to use spaces in some of the file names for the png files in the menus. Is there any way around this? Can I force it to replace spaces with underscores? Can I go in and manually change the links and the file names (there aren't too many). this is very annoying - how could this happen?
    Thanks,
    Scott

    If your server doesn't like spaces in file names, it's likely due to HTML address rules. However, these files won't be linked via HTML, but through the AuthoredContent.xml file directly into the SWF playing in the Flash player, which doesn't have the same limitations as HTML.
    If your server is kicking a fuss up about this, replace the single space character in the PNG filename with an underscore character (do this at file system level), then edit the AuthoredContent.xml file and replace the space character in the PNG filename with an underscore character. Save everything, and then upload the files in the same hierarchy that Encore exports.
    That should do it.

  • Can't email files with spaces in the file name since 10.5.2 upgrade

    Not sure if this is a bug with Leopard or I'm being stupid (possibly the later) but... Has anyone else experienced this issue and do you know what is causing it? I am currently unable to send a file that has a space in the file name. The only change on my system that has occurred since I last sent and email in a similar way is I've updated my OS from 10.5.1 to 10.5.2. Any ideas how to fix it?

    Sorted. Well sort of. I still have the problem but I know why. Apparently O2 will not allow anyone to send an attachment which has a space in the name. They claim that this reduces spam - no idea why they think that will stop spam but there you go...

  • How move file with space in the name to another foler on Linux from ABAP?

    Hi experts,
    My requirement is to move the file on Linux to another folder via ABAP program.
    IN SM49 is defined ZMOVE command for "mv" operating system command. In ABAP, fm:
    SXPG_COMMAND_EXECUTE calls ZMOVE external command to move the file to another folder.
    But in case that file has space in the file name, then the fm gives error and the file can not be moved.
    I have tried as given in the Note 1152084 - Parameter for external commands but it doesn't work.
    Don't know if the reason is that the note is for Windows or Unix and we have Linux.
    So, I have tried with ''%file name%' and '''file name'''.
    PLease advice hoe to move file on Linux to another folder from ABAP program if the file has spec in the name.
    Thanks in advance.
    Kind regards,
    Danijela Zivanovic

    Hi,
    You can also try :
    mv "file\ name" /<path_to_new_dir>
    (Put "\" before each space)
    Regards.
    Rajesh Narkhede

  • Mplayer can't play files with spaces in their name

    After scratching my head and reinstalling codecs several times without luck, and old memory resurfaced of this occuring before and I managed to solve the problem.
    The thing is that if you doubleclick a file in Nautilus, and said files has spaces in its name, mplayer won't be able to play it, and gives a very cryptic error message, ie "cannot play file a%20b.avi" if the name of the file is "a b.avi".
    The trick is mentioned in this thread -- you edit /usr/share/applications/mplayer.desktop and change 'Exec=gmplayer %U' to 'Exec=gmplayer %F'.
    The bug has been around forever, and hasn't been fixed yet. Perhaps the mplayer devs don't want to fix it. In any case, I would propose that either we fix this in the mplayer Arch package, or that someone more knowledgeable than I get in touch with the devs about it.
    Just a suggestion, but I think it's kind of important. It's really confusing to new users.

    In my opinion, it it's not arch's job to fix bugs from upstream, no matter if it's mplayer or gnome's fault. Of course there are exceptions, eg if a bug in a critical package hardlocks the whole system, or adds a huge security risk.
    I would like to belive that the general arch user is smart enough to find one of the 30 threads about this bug (or the entry on the bugtracker) and fix it themselves. Personaly I would put this in the same category as packages that don't have a .desktop file at all from upstream.
    Oh, and as a small sidenote: http://phraktured.net/patching-patching-patching.html

Maybe you are looking for