Need Help from Some Developer
Need Help from Some Developer
Hi guys i need any script Command to create button with this function
After i select File the button command should do next
Copy Name of Selected File Folder
Create new Folder with copied Name
Move that file in that folder
While position will remain on root
ex: I have c:\Ex.mp3 after i Select and press button that we will give him command
ex.mp3 will be moved to C:\ex\ex.mp3 and position will still remain on Root C:
Thanks in Advance
After i select File the button command should do next
Copy Name of Selected File Folder
Create new Folder with copied Name
Move that file in that folder
While position will remain on root
ex: I have c:\Ex.mp3 after i Select and press button that we will give him command
ex.mp3 will be moved to C:\ex\ex.mp3 and position will still remain on Root C:
Thanks in Advance
Re: Need Help from Some Developer
Hi Formingus, welcome.
Please think about better thread subjects next time.
E.g.: "Script needed: create folder from file name and move to" or like that.
For your issue try something like this:
See the link in my footer for an how-to execute scripts and create buttons.
.
Please think about better thread subjects next time.
E.g.: "Script needed: create folder from file name and move to" or like that.
For your issue try something like this:
Code: Select all
/*
Copy Name of Selected File OR Folder
Create new Folder with copied Name
Move that file OR FOLDER in that folder
While position will remain on root
*/
end( get("CountSelected") > 1 , Select one item only);
//GET Name of Selected File Folder
$ITEM = "<curitem>";
$NAME = "<curname>";
if(exists($ITEM)==2){
$FOLDER = $ITEM;
$FldTemp = $FOLDER . "_xyTEMPxy";
//Create new Folder with copied Name
new $FldTemp, dir;
//Move that file in that folder
//While position will remain on root
moveto $FldTemp, $FOLDER; wait 1000;
renameitem($NAME,$FldTemp);
}else{
$FILE = $ITEM;
$BASE = report("{BaseName}",1);
//Create new Folder with copied Name
if(exists("<curpath>\$BASE")!=2){new $BASE, dir;}
//Move that file in that folder
//While position will remain on root
moveto $BASE, $FILE;
}
See the link in my footer for an how-to execute scripts and create buttons.
.
Re: Need Help from Some Developer
I Will Sorry if i made some mistake , i am not familiar with programing any way that exactly what u saved allot of mine timeStefan wrote:Hi Formingus, welcome.
Please think about better thread subjects next time.
E.g.: "Script needed: create folder from file name and move to" or like that.
For your issue try something like this:
Code: Select all
/* Copy Name of Selected File OR Folder Create new Folder with copied Name Move that file OR FOLDER in that folder While position will remain on root */ end( get("CountSelected") > 1 , Select one item only); //GET Name of Selected File Folder $ITEM = "<curitem>"; $NAME = "<curname>"; if(exists($ITEM)==2){ $FOLDER = $ITEM; $FldTemp = $FOLDER . "_xyTEMPxy"; //Create new Folder with copied Name new $FldTemp, dir; //Move that file in that folder //While position will remain on root moveto $FldTemp, $FOLDER; wait 1000; renameitem($NAME,$FldTemp); }else{ $FILE = $ITEM; $BASE = report("{BaseName}",1); //Create new Folder with copied Name if(exists("<curpath>\$BASE")!=2){new $BASE, dir;} //Move that file in that folder //While position will remain on root moveto $BASE, $FILE; }
See the link in my footer for an how-to execute scripts and create buttons.
.
thank u allot and best Regards
Formingus
Re: Need Help from Some Developer
Hi After Update this script not working any more.
If you can help me again it will be appreciated allot

Thank You in Advance
If you can help me again it will be appreciated allot

Thank You in Advance
Re: Need Help from Some Developer
Code: Select all
new($FldTemp, "dir");One of my scripts helped you out? Please donate via Paypal
-
admin
- Site Admin
- Posts: 64917
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Need Help from Some Developer
This might help even more:
Code: Select all
new($BASE, "dir");FAQ | XY News RSS | XY X
Re: Need Help from Some Developer
Let's say: just use new() instead of the old form without parentheses...
One of my scripts helped you out? Please donate via Paypal
Re: Need Help from Some Developer
Guys neither of commands Work it Says New its not Valid Command.

So if there is another Way it will appreciated.
So, i want Selected File to Move into new Created Folder from File Name
Ex: File Name : C:\Xyplorer.exe
After Select and press Button it Will be moved at c:\XyPlorer\XyPlorer.exe
Thank You Guys For Fast Replay

So if there is another Way it will appreciated.
So, i want Selected File to Move into new Created Folder from File Name
Ex: File Name : C:\Xyplorer.exe
After Select and press Button it Will be moved at c:\XyPlorer\XyPlorer.exe
Thank You Guys For Fast Replay
Re: Need Help from Some Developer
Because you didn't even use these commands?
They must be replaced by
Code: Select all
new $FldTemp, dir;
new $BASE, dir;Code: Select all
new($FldTemp, "dir");
new($BASE, "dir");One of my scripts helped you out? Please donate via Paypal
Re: Need Help from Some Developer
Ok After Replacing those command its work fine but creating folder confirmation appear
I Read something about move to and there ask to put 2 thats mean overwrite without asking
Try couple of time but as unfamiliar with scripts yet didn't have success.
This is Whole Command i use so if you can re edit it please. Thank You
So if you See hear Folder is not Created

And its Ask to Create Folder

Thank in Advance for helping Me
I Read something about move to and there ask to put 2 thats mean overwrite without asking
Try couple of time but as unfamiliar with scripts yet didn't have success.
This is Whole Command i use so if you can re edit it please. Thank You
Code: Select all
/*
Copy Name of Selected File OR Folder
Create new Folder with copied Name
Move that file OR FOLDER in that folder
While position will remain on root
*/
end( get("CountSelected") > 1 , Select one item only);
//GET Name of Selected File Folder
$ITEM = "<curitem>";
$NAME = "<curname>";
if(exists($ITEM)==2){
$FOLDER = $ITEM;
$FldTemp = $FOLDER . "_xyTEMPxy";
//Create new Folder with copied Name
new($FldTemp, "dir");
//Move that file in that folder
//While position will remain on root
moveto $FldTemp, $FOLDER; wait 1000;
renameitem($NAME,$FldTemp);
}else{
$FILE = $ITEM;
$BASE = report("{BaseName}",1);
//Create new Folder with copied Name
if(exists("<curpath>\$BASE")!=2)new($BASE, "dir");
//Move that file in that folder
//While position will remain on root
moveto $BASE, $FILE;
And its Ask to Create Folder

Thank in Advance for helping Me
Re: Need Help from Some Developer
Code: Select all
end(get("CountSelected") != 1, "You have to select only ONE item!");
$curItem = "<curitem>";
if not (exists("<curpath>\<curbase>") == 2) { new("<curpath>\<curbase>", "dir"); }
moveto "<curpath>\<curbase>", $curItem;One of my scripts helped you out? Please donate via Paypal
Re: Need Help from Some Developer
Even easier than all the scripting, but only for one item at a time:
1. Right Mouse drag the item within the list
2. Select "Move to new subfolder" from the context menu.
3. You're asked for the name of the new subfolder which defaults to the basename of the file.
4. Klick OK and you're done.
1. Right Mouse drag the item within the list
2. Select "Move to new subfolder" from the context menu.
3. You're asked for the name of the new subfolder which defaults to the basename of the file.
4. Klick OK and you're done.
Ralph 
(OS: W11 24H2 Home x64 - XY: Current x32 beta - Office 2024 32-bit - Display: 1920x1080 @ 125%)
(OS: W11 24H2 Home x64 - XY: Current x32 beta - Office 2024 32-bit - Display: 1920x1080 @ 125%)
Re: Need Help from Some Developer
Right Bro.. This one Worked like charmhighend wrote:This should be totally enough for what you want to achieve. Right?Code: Select all
end(get("CountSelected") != 1, "You have to select only ONE item!"); $curItem = "<curitem>"; if not (exists("<curpath>\<curbase>") == 2) { new("<curpath>\<curbase>", "dir"); } moveto "<curpath>\<curbase>", $curItem;
Thank you
Re: Need Help from Some Developer
This is alternative method and work as wellRalphM wrote:Even easier than all the scripting, but only for one item at a time:
1. Right Mouse drag the item within the list
2. Select "Move to new subfolder" from the context menu.
3. You're asked for the name of the new subfolder which defaults to the basename of the file.
4. Klick OK and you're done.
But with Highend code i can use on button click even with hotkey
Any way thank you for Replay
XYplorer Beta Club