Folder name

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • JDog37
    No longer a forum member
    • Feb 2008
    • 566

    Folder name

    Hello all, I got a question: My .apz creates a "project" folder on the users desktop when they click the button.

    I want them to be able to name the folder to what they want, then it creates that folder.

    BUT also there are many buttons to create other folders inside of that "named folder".

    I have all the buttons working but how do I get the folders into the users named folder. Understand?

    The project is a folder maker for the users. Like a "work folder" for their projects.

    Many thanks guys,
    Joe
  • holtgrewe
    Indigo Rose Customer
    • Jul 2002
    • 779

    #2
    Dog,

    There are numerous ways to accomplish this.
    The first thing that comes to mind would be to invoke a Dialog.Input() event requesting the folder name, then use your Folder.Create().

    You could insert another button to Folder.Rename() to rename the folder.
    hth

    Comment

    • JDog37
      No longer a forum member
      • Feb 2008
      • 566

      #3
      Thanks

      Thank you holtgrewe, Now the thing is how would I write the code to insert the other folders into it. Here's what I mean.

      Folder.Create(_DesktopFolder.."\\Work Field"); <--(Here is where the user would rename the folder)

      But how will I be able to make these folders inside the users renamed one??

      Folder.Create(_DesktopFolder.."\\Work Field\\Cars");
      Folder.Create(_DesktopFolder.."\\Work Field\\Cars\\Trucks");
      Folder.Create(_DesktopFolder.."\\Work Field\\Cars\\Trucks\\Vans");

      Im like lost on how to do this..

      Thanks,
      Joe

      Comment

      • ShadowUK
        No longer a forum member
        • Oct 2007
        • 1322

        #4
        One word. Concentation.

        Code:
        while (_G) do
        	strFolder = Dialog.FolderBrowse("Select a folder for storing data.", _DesktopFolder);
        
        	if (strFolder ~= "CANCEL") then
        		break;
        	end
        end
        
        Folder.Create(strFolder);
        Folder.Create(strFolder.."\\Cars\\");
        Folder.Create(strFolder.."\\Cars\\Trucks\\");
        Folder.Create(strFolder.."\\Cars\\Trucks\\Vans");
        Last edited by ShadowUK; 02-12-2009, 01:16 PM. Reason: Woops.

        Comment

        • JDog37
          No longer a forum member
          • Feb 2008
          • 566

          #5
          Great

          Nice work shadowuk! Thank you. :yes

          Joe

          Comment

          • JDog37
            No longer a forum member
            • Feb 2008
            • 566

            #6
            New Q:

            Ok I got my folders to work right.

            When the button is clicked it puts a new work folder on the desktop or wherever they want, (Thanks ShadowUk!) Now say I have a few buttons that make other folders, (I do) and say the user wants folders to go into other folders, (Sub Folders) in the "work field" folder, instead of all in just the "Work Field" folder. They pic what folder they want the sub folder to go into.. (Maybe like their own categories the way they want)

            How can I do this?

            Ex: "Work Field" (Main Root Folder) User wants Cars, trucks, vans and parts folders in the work field, BUT wants the parts in the truck folder as a sub folder only, NOT in the "Work Field" folder.

            Whoo, that was confusing to write out but thats it..

            May the code gods please help,

            Thanks humbly,
            Joe

            Comment

            • Protocol
              Indigo Rose Customer
              • Oct 2002
              • 423

              #7
              Love to help, brother.

              I've read this a few times, but I'm not sure I completely get it. It sounds like you're asking a GUI interface design question. I may be completely off, but if so, then I would resort to a listbox wherein the user can multi select which folders they want to add the current folder to. The list would display all of the available folders and using some fun keys such as ">", you can define a folder as a sub folder. Then again, I've never used the tree menu and I'm certain that that would be better for this sort of interface.

              Again, sorry if I'm way off on this. I didn't fully understand the project. :o If you want to post or send me the apz or exe, I'll take a look at make a suggestion for ya.

              Protocol
              "White-colla-AMS-gangsta."

              Comment

              • JDog37
                No longer a forum member
                • Feb 2008
                • 566

                #8
                Ok..

                Ok here you go. I hope this clears it up! lol Thank you for the time, much appreciated!

                Thanks,
                Joe
                Attached Files

                Comment

                • JDog37
                  No longer a forum member
                  • Feb 2008
                  • 566

                  #9
                  Anyone

                  Anyone care to take a stab at it? Lol.. :o

                  Comment

                  • rexzooly
                    No longer a forum member
                    • Jul 2007
                    • 1512

                    #10
                    Originally posted by JDog37 View Post
                    Anyone care to take a stab at it? Lol.. :o
                    do you mean you want your app to globaly remeber the folder your user as made? this is that i think your trying to say maybe set a functions

                    i will do it with a simple it saves a txt file named the same thing
                    so the app will always remeber the folder

                    Code:
                    RootFolder();
                    Code:
                    RootFolder = function()
                       RootName = TextFile.ReadToString(SourseDrive.."\\dataread.txt");
                       if RootName == "" then
                         while (_G) do
                    	  strFolder = Dialog.FolderBrowse("Select a folder for storing data.", _DesktopFolder);
                    
                    	if (strFolder ~= "CANCEL") then
                    		break;
                    	e
                       else
                          strFolder == RootName;
                      end
                    end;

                    Comment

                    • rexzooly
                      No longer a forum member
                      • Jul 2007
                      • 1512

                      #11
                      that was just a so so post not tested i have made this .. might help you :yes
                      also fixed my own error in the code i posted

                      hope this helps a little
                      Last edited by rexzooly; 11-15-2009, 03:53 PM.

                      Comment

                      • JDog37
                        No longer a forum member
                        • Feb 2008
                        • 566

                        #12
                        Hello..

                        Thank you rexzooly! I am a little confused as well.. Not sure if its possible but how it ask where yo want the folder to be placed.. Is it possible to do it maybe in like a tree function?? I'm not sure what you wanted the check box for tho- Can you explain?

                        OR maybe even a drag and drop the folders where they want them. The folders would be already to pick from so all they would have to do is drop them where they would want them to go?? Possible??

                        Thank you all for the help I am getting, :yes:yes:yes:yes
                        Joe

                        Comment

                        • rexzooly
                          No longer a forum member
                          • Jul 2007
                          • 1512

                          #13
                          Originally posted by JDog37 View Post
                          Thank you rexzooly! I am a little confused as well.. Not sure if its possible but how it ask where yo want the folder to be placed.. Is it possible to do it maybe in like a tree function?? I'm not sure what you wanted the check box for tho- Can you explain?

                          OR maybe even a drag and drop the folders where they want them. The folders would be already to pick from so all they would have to do is drop them where they would want them to go?? Possible??

                          Thank you all for the help I am getting, :yes:yes:yes:yes
                          Joe
                          look in the code that check box as you stated anywhere else if you click the check box it will save it in the same folder like the parts and so on files but if not checked it will ask the user to pick a place for it to be save thats all
                          really.

                          try and explane little more what your trying to do and i see if i can update my example a little more when i am at my computer on my laptop with linux live CD and remoting a nother windows pc so no ams at the mo.

                          :yes

                          Comment

                          • JDog37
                            No longer a forum member
                            • Feb 2008
                            • 566

                            #14
                            Here you go

                            I hope this can help out. I tried to explain in detail..

                            THANK you so much for the help!!
                            Joe
                            Attached Files

                            Comment

                            • rexzooly
                              No longer a forum member
                              • Jul 2007
                              • 1512

                              #15
                              Sorry ur app really got me confused what you wanting to do lol

                              Comment

                              Working...
                              X