I have a directory with a big amount of files. I would like to use the scripting feature to: 1. create a new directory and 2. move the selected files in the new directory.
I'm sure there is an easy way but I can't seem to get it yet. Any thoughts?
Create New Directory and Move Files Script
Re: Create New Directory and Move Files Script
Not sure what exactly you want to do, but to move selected items anywhere you can simply use command movetoiryx wrote:I have a directory with a big amount of files. I would like to use the scripting feature to: 1. create a new directory and 2. move the selected files in the new directory.
I'm sure there is an easy way but I can't seem to get it yet. Any thoughts?
And if the destination folder doesn't exists, XY will create it on-the-fly ! That's a standard feature of XY's Move/Copy/Backup To feature, i.e. works the same using the GUI
Proud XYplorer Fanatic
Sorry, I wasn't clear
I want a new folder to be created every time I invoke the command. That could be either based on the first file in the selection or based on the date and time.
Re: Sorry, I wasn't clear
moveto "<curbase>";iryx wrote:I want a new folder to be created every time I invoke the command. That could be either based on the first file in the selection or based on the date and time.
or
moveto "<dyyyy-mm-dd hh-nn>";
Syntax here
Proud XYplorer Fanatic
-
admin
- Site Admin
- Posts: 65185
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Sorry, I wasn't clear
This should do (selects all items in current folder, then moves them to newly created (if nececssary) subfolder named acc. to current date/time:iryx wrote:I want a new folder to be created every time I invoke the command. That could be either based on the first file in the selection or based on the date and time.
sel a; moveto "<dyyyy-mm-dd hh-nn>";
Try with care on some test files...
FAQ | XY News RSS | XY X
Current Solution
Close,
here is what I ended up doing:
input $ext, Enter Name, _<dyyyy.mm.dd>-<curbase>;moveto $ext
since I only wanted to move the selected items to a new subdirectory based on the name of the selected items and not all files.
here is what I ended up doing:
input $ext, Enter Name, _<dyyyy.mm.dd>-<curbase>;moveto $ext
since I only wanted to move the selected items to a new subdirectory based on the name of the selected items and not all files.
XYplorer Beta Club