2 Replies Latest reply on Feb 24, 2016 8:28 PM by tpk1982

    Need quick help for Folder Naming

    tpk1982 Level 4

      Hi,

       

      I am trying to create folders. But i am not able to give folder name start with "~" symbol. Please help me to solve this issue. Tried coding:

       

      var myFolder = Folder.selectDialog("Choose Main folder to created subfolders");    
      var mygetname=prompt("Enter the Event Name","");
      new Folder(myFolder + "/" + mygetname).create();  
      new Folder(myFolder + "/" + mygetname+ "~CF").create();// this folder not created  
      new Folder(myFolder + "/" + mygetname+ "/Final" ).create();  
      

      Thanks,

      Karthi

        • 1. Re: Need quick help for Folder Naming
          pixxxel schubser Level 5

          Hmmh?

          why do you need a "~" symbol at the beginning of folder name?

           

          Regardles of: I don't know a direct way. But this could be a workaround:

          var myFolder = Folder.selectDialog("Choose Main folder to created subfolders");
          var mygetname=prompt("Enter the Event Name","");
          new Folder(myFolder + "/" + mygetname).create();
          var toChange = new Folder(myFolder + "/" + mygetname+ "/"+"temp");
          toChange.create();
          toChange.rename ("\u007ECF");
          new Folder(myFolder + "/" + mygetname+ "/Final" ).create();
          

           

          Have fun

           

          • 2. Re: Need quick help for Folder Naming
            tpk1982 Level 4

            Hi Pixxxel,

             

            Thanks a ton. I used the rename and hex code but i failed. I understood where i missed.

             

            even we can give directly toChange.rename ("~CF"); also work now  in your code

             

            Thanks,

            Karthi