How can i put a "/" or "\" in a file name with filewriter?????

hi there
how can i put "/" or "\" in a file name? i am using filewriter to create file, here is my code
String fileName = year+"\\"+month+"\\"+date+":"+hour+":"+minute+":"+second+FILE_EXTENSION;
fw = new FileWriter("users"+"/"+userDirectory+"/"+OUTPATH+"/"+fileName, false);
i keep getting error message :"invalid file name, path, directory...", i want to have the following format in my file name: yyyy/mm/dd:hh:mm:ss.txt,
do you know how to get date and time in this format: ie. March 10, 2002 14:01:32, or something like this?
thank you

You are using invalid characters in you name. For example,
: - is used to separate the drive from the path
/ - is used to separate directories
therefore they can't be used in the filename.
Open an editor and try creating a file using the format you want and see if the editor can save it, before attempting to do it in Java.

Similar Messages

  • How can I list my iphoto library by file name only?

    How can I list my iphoto library by file name only?

    There are two apps that can do that for your.
    1 - the better of the two is  iPhoto Library Manager.  You will have to manually select those Events in Library A that are not in Library B and copy them to B.  Then do the same for B to A.  This also copies both the original and edited versions, keywords, titles, descriptions, faces and places.
    2 - the second app is SyncPhotos.  This one is automatic and will copy the original images in A that are not in B into B and the same for B to A. This does not copy edited versions or any of the metadata, i.e. keywords, etc.

  • How can I put more than one source file when I am creating my installer from LV 7 Express

    Hi,
    I am creating my installer for my application and I would want to add more than one source file at once, how could I do it?
    Thanks,
    ToNi.

    Hi,
    I'm referring to the first executable. In other words, I have my application and I want to build and executable of it. Then I go to "Tools->Build application..." and then in the source files tab I can add my vi files but I want to add more than vi at the same time (at once) and not one by one. How can I do it?
    And my second question is: When I make the installer for my application I save the configuration in a build Script file (.bld) in order to use it whenever I want. Then If from another computer different from the one where I generate the .bld file, I load it, LV tells me that something is wrong (LV says there are some errors in some VIs but It doesn't tell me what files are). Why?
    Thanks in advance,
    ToNi.

  • When creating a photo book how can I sort the photos shown by file name?

    I am creating a photo book. The photos shown in the right hand column appear out-of-order. How do I sort them by file name? The album in iPhoto the book is based on is sorted by file name.

    You can not - they are soreted by date
    --  the only solution I have seen is to put them in an album sorted the way you and and then use the batch cnage command to redate them with a small invrement between so a data sort matches your desired sort  --  I personally do not want to redate a bunch of my photos nor do i want  to have to go through and un-re- date a bunch
    suggest a change to Apple - iPhoto menu ==> provide iPhoto feedback
    LN

  • How can I modify ONE CHARACTER in the file name???

    I have in right side meta tag panel a file name , original name and copy name fields.
    The file was already renamed. So i am not interested original file name ,anyway i cant click on it.
    I would like to modify ONE +"!/"%/"+! CHARACTER in filename field which is 50 characters long.
    If I click on it gives me an batch rename window.
    If I click copy name I have to write all from zero BECAUSE I CANT COPY the filename field.
    so here we are in 21st century
    I have a solution: i copy the filename from vista explorer and paste it in copy name BUT what if I have to do this hundreds time???

    First, what has the copy name to do with file name? I think you're misunderstanding the purpose of the copy name field. It is for giving a virtual copy a distinctive name.
    Now for file naming... if I understood correctly, you want to edit the name right in the Metadata panel, but the file name field is non-editable. This is a bug. It is exhibited when you have multiple files selected and change the metadata panel view. You can temporarily fix it by selecting a single file in the grid and changing the metadata panel view from All to Default or vice versa (see the attached screenshot). Now that the field became editable, you change on character.
    If you want to do it for hundreds of files using a template, then would be nice if you provide your source and target filename templates.

  • How to Use FULL TEXT Indexing Search on file names with brackets

    I would like to use a FULL Text Seach query to find Files on a windows file system
    The Problem is when the case comes up where there is a parentheses"()" in the file name. This example was created from a file copy being pasted in the same folder location as the original a few times.
    Here is my code:
    DECLARE
    @SearchWord VARCHAR(50)
    SET @SearchWord = '"KAP1556PP_P01(2).jpg"'
    SELECT [FileName], [FilePath] FROM [dbo].[tblLegalPlan] WHERE CONTAINS(*, @SearchWord)
    When I use Double quotes for the @Searchword I recieve no results.
    SET
    @SearchWord = '"KAP1556PP_P01(2).jpg"'
    When I remove the Double  Quotes for the @Searchword I recieve an error message:
    SET
    @SearchWord = 'KAP1556PP_P01(2).jpg'
    Msg 7630, Level 15, State 2, Line 8
    Syntax error near '(' in the full-text search condition 'KAP1556PP_P01(2).jpg'.
    When I search for files containing TEXT up to the bracket i Get undesrired results obviously:
    SET
    @SearchWord = '"KAP1556PP_P01*"'
    Results
    FileName FilePath
    KAP1556PP_P01(1).jpg BC\EPP\KAP
    KAP1556PP_P01(2).jpg BC\EPP\KAP
    I would like results where I can search for the file name and only one file is found matching the search word.
    Thanks

    Is this a SQL Server Reporting question?  You maybe better off posting this in a more relevant forum.

  • How can I check every 5 secs a file Length with Threads?

    As a matter of fact the subject is the main question.
    I need your HELP! PLEASEE!!

    import java.io.*;
    public class RFile implements Runnable {
         public static void main(String args[]) throws Throwable {
              RFile rf = new RFile(new File(args[0]));
              new Thread(rf).start();
         File file = null;
         public RFile(File f) {
              file = f;
         public void run() {
              try {
                   while (true) {
                        System.out.println(file.length());
                        Thread.sleep(5000);
              } catch (Throwable err) {};
    }

  • How can i put apps from one ipod to a new ipod?

    how can i put apps from one ipod to a new ipod?

    iOS: Transferring information from your current iPhone, iPad, or iPod touch to a new device

  • How do I put text into an Edge File that clients can edit easily afterwards

    Hi
    Can anyone explain how I can put text into an edge file (styled with google fonts) and make it so that clients can access the text and update the text as they require?
    Previous suggestion was dynamically loading a .txt file - any instructions would be most appreciated.
    Thanks.

    Hi Resdesign!
    Your code is very useful to learn how to use Json in Adobe Edge Animate!
    But I have a question: why you use ( i ) as argument of the function UpdateInfo and when you recall it you use ( index )?
    $.getJSON('slides.json', function(data){
              //for(var i=0; i<data.length; i++){
    function updateInfo(i){
                        sym.$("photo").css({"background-image": "url('"+data[i].image+"')"});
                        sym.$("pillar").html(data[i].pillar);
                        sym.$("what").html(data[i].what);
                        // position
              index = -1;
              sym.$("btn").click(function(){
              index++;
                        if (index>=5){
                                  index = 0;
              updateInfo(index);
    Many thanks for your attention!
    Davide

  • How can I put my icloud photos to camera roll or photo stream?

    I got a nee iphone, i backed up everything and restored it into mu new iphone, but the pictures didn't restore so i did it manually but now on my phone i got different albums icloud photo stream and camera roll. How can i put the icloud picture into camera roll or photo stream. Any ideas?? On my old iphone ive deleted everything.

    Hello Ozzie94,
    Thanks for the additional information. The camera roll is designed for photos taken on your device, or saved images from Mail and other applications. Photos synced from a computer are organized into their own album(s):
    View photos and videos - iPhone
    http://help.apple.com/iphone/7/#/iph3d267610
    - Camera Roll—photos and videos you took on iPhone, or saved from an email, text message, webpage, or screenshot
    - Shared photos and videos—Photos and videos that you’ve shared with iCloud Photo Sharing or that others have shared with you (see iCloud Photo Sharing)
    - Photos and videos synced from your computer (see Sync with iTunes)
    Additionally, you may find more information by using another one of Apple's support resources - https://getsupport.apple.com
    Thanks,
    Matt M.

  • How can I put my podcasts in one place and my music in another?

    How can I put my playlists on my NAS media server (Buffalo Linkstation mini) so I can access them through Home Sharing and Sonos?  FYI, right now I run my iTunes with media location on my laptop's c: drive so I can manage podcasts while on the go and map a lettered network drive to the media server device when I connect up at home.

    Duplicated: https://support.mozilla.com/en-US/questions/886179

  • How can i put my itunes library from an old mac g4 10.4.11 to an ipod2?

    How can i put my itunes library from an old mac g4 10.4.11 to an ipod2?

    Install iTunes 9.2.1 on your computer. If the device's requirements specify iTunes 10 or newer, you need to purchase Mac OS X 10.5 on DVD.
    (63879)

  • How can i put photos from my mac to my ipad touch

    How can i put photos from my mac to my ipad touch
    I have them in an album.
    Thanks for your help

    See:
    iOS and iPod: Syncing photos using iTunes

  • On Firefox 4, how can I put one "new tab" on the "tab bar" (The + sign) and one next to the "back/forward" buttons (as in FF 3.6)?

    On Firefox 4, how can I put one "new tab" on the "tab bar" (The + sign) and one next to the "back/forward" buttons (as in FF 3.6)?
    In my current Firefox, the "new tab" icon/item from the "customize" pop-up window menu of items is placed next to my home, back, forward buttons near the top-left of my header (Button 1 for "new tab"). Then, the tab bar automatically come with a small tab (with a + sign) to the right of your last tab opened (so you click on + and a new tab opens. Button 2 for "new tab"). I like to have this "new tab" button twice (as a + mini tab, and next to my "home icon".
    When I upgraded to Firefox 4, I seemed to be only able to "customize" or use the "new tab" in one place. Either as an icon next to home button, or as a "+ minitab", but NOT both.
    What can I do to put this button in Firefox 4 on BOTH places???
    Your help is really appreciated. I want to upgrade, but I want my buttons on both places...
    I upgraded to FF 4, but downgraded again just because this feature... that's just me of coarse :-)

    *New tab toolbar button: https://addons.mozilla.org/firefox/addon/new-tab-toolbar-button/

  • How can I put a .pdf (or table) in iWeb that one sees on the web site on a web page without downloading?

    How can I put a pdf (not downloadable, but viewed on the website) or a table in iWeb?

    If it's a one page PDF file just drag it onto the webpage and resize to fit. If it's a multi page PDF file you can add it as in this demo page: Scrolling Text Box
    OT

Maybe you are looking for

  • Problems with getting signal to my Video Mixer with DVI to Comp adapter

    hi, i have a MacBook Pro and a G5 Quadcore with an NVidia7800GT card. i am trying to get my G5 to detect my Edirol V4 video mixer. the MBP sees it immediately. the G5 cannot detect it! what i have tried so far: - swapped the DVI-Comp adapters i have

  • Satellite C660-2EV crashed with BSOD and does not boot

    My Satellite laptop C660-2EV running Windows 7, for no apparent reason crashed to the blue screen of death, after which it would not reboot. I have attempted to reboot in safe mode using the function keys but it gets as far as loading: windows\system

  • Still not getting here map app

    Please nokia help me iam losting my here map beta application and using the nokia store app but cant succeeded please help me as soon as possible Solved! Go to Solution.

  • Video template not working in simulator

    Man, I am really sorry to have to bring this up...again. I have searched the forums, and I cannot find an answer to this. I am still working in DVD SP 2. I have found that when using a menu template based on a .mov (video) file - for example the Thea

  • Windows authentication

    FireFox 30 no longer prompts for Windows Authentication? I'm having to turn Basic Auth on in IIS to force this?