If I do this:
Highlight one (or many files) in any random directory
Is there a script out there for XY to do this:
Create a new folder (in the directory where the files are) named with today's date in this format (MM-DD-YYYY)
Move all highlighted files to this newly created directory
Appreciate any assistance.
Cheers!
VP
Does anyone have a script that does this...
Re: Does anyone have a script that does this...
new()
moveto()
One of my scripts helped you out? Please donate via Paypal
-
- Posts: 163
- Joined: 06 Nov 2009 14:01
Re: Does anyone have a script that does this...
Highend
I get the basics of what are getting at but how does this take "selected" files into context? If I have 40 files in the directory and only highlight 4 of them - I only want those four to go into a folder with today's date.
I found this snippet in the forum:
$SelectedItems = get("SelectedItemsPathNames", "|");
moveto "<date mm-dd-yyyy>", $SelectedItems;
But when test it (via Test Script) - it does nothing?
Cheers
VP
Last edited by Vocalpoint on 06 Oct 2021 16:45, edited 1 time in total.
Re: Does anyone have a script that does this...
moveto()
help entry?
source [optional] The item(s) that will be copied or moved. Alternatively it can point to the source control (":tree", ":list", or ":catalog"), or to a text file containing a list of source items ("*filename"; see below).
If missing then the selected items of the focused control (List, Tree, Catalog) are used.
One of my scripts helped you out? Please donate via Paypal
Re: Does anyone have a script that does this...
just as a tip you can select files, press (Ctrl+Shift+X) and choose date from drop down menu
- Attachments
-
- 2021-10-06_182117.png (8.84 KiB) Viewed 1759 times
-
- Posts: 163
- Joined: 06 Nov 2009 14:01
Re: Does anyone have a script that does this...
Except I would need to have every relative date (potentially 365) at the ready on the drop down. I do not want to have to type anything and need it to work on the fly.
BTW: I finally have some working code (and it's quite simple):
foreach($item, "<get SelectedItemsPathNames |>") {
moveto "<date mm-dd-yyyy>", $item, , 2;
}
Cheers!
VP
Re: Does anyone have a script that does this...
Apart from that it doesn't make much sense to create a date on each loop, a simple
does the exact same thing
Can you please put code into BBCode tags?
moveto "<date mm-dd-yyyy>", , , 2;
does the exact same thing
Can you please put code into BBCode tags?
One of my scripts helped you out? Please donate via Paypal
-
- Posts: 163
- Joined: 06 Nov 2009 14:01
Re: Does anyone have a script that does this...
Even better!
And how exactly do I put the code in BBCode tags within this editor? Is it the Code Display button?
Thanks!
VP
Re: Does anyone have a script that does this...
One of my scripts helped you out? Please donate via Paypal
-
- Posts: 163
- Joined: 06 Nov 2009 14:01