Command Worked before now not!!!
Posted: 21 Nov 2024 20:35
I Use this command to create directory and move a selected file created directory with name file name....
ex: File work.rar, will moved into directory name called WORK
ex: File work.rar, will moved into directory name called WORK
This script not work on last version, where is the problem ?Select then Move to Selected Named Folder
/*
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;
}
For Newer Version
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;