I just need to confirm some things before I buy.
Can XYplorer move files (not copy files) from various sub-folders over to a single destination folder using a control file name list saved in a TXT or CSV format?
Additionally, can XYplorer drill down the "2018" folder shown below and search among all five of the 2018 sub-folders for filenames listed in the Control file name list?
For example, two file names in the Control List are "1234.jpg" and "A1056.pdf". Is the XYplorer search functionality advanced enough to find one file inside the "2018-02" sub-folder and the other file inside the "2018-05" sub-folder and then once found can XYplorer then automatically move (not copy) these two files from two different sub-folders over to the destination folder path shown below as well?
C:\MyData
|---2018
|--------2018-01
|--------2018-02
|--------2018-03
|--------2018-04
|--------2018-05
C:\Important_Files
|---Destination_Folder
C:\Control_File_Name_List.csv
(Location of CSV or TXT file containing 300 File Names of files XYplorer needs to target for moving from sub-folders to destination folder).
Thank you for your time.
Are Control File Name Lists supported?
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Are Control File Name Lists supported?
From .csv? Nope, not without scripting.
From .txt? There is the
But regarding your second question: It would move all files mentioned in that text file, not only two of them.
At least not without scripting the whole stuff again...
From .txt? There is the
moveto scripting command that supports a text file that contains a list of source files.But regarding your second question: It would move all files mentioned in that text file, not only two of them.
At least not without scripting the whole stuff again...
One of my scripts helped you out? Please donate via Paypal
-
binar
- Posts: 21
- Joined: 11 Aug 2013 05:32
Re: Are Control File Name Lists supported?
Highend,
Thank you for the post. I'm sorry for any confusion I may have caused by mentioning two files as an example while also mentioning the text file contains 300 file names. My intention is to have XYPlorer move all file names contained in the Control File Name List text file and not only two files.
Just to confirm, for the TEXT file does XYPlorer require I write the File Name and also include the path as shown in the example below?
1234.jpg C:\MyData\2018
Or is it enough to just provided XYplorer the File Name within the text file as shown in the example below?
1234.jpg
Lastly, does XYplorer require I write down the entire full path of file I need moved? Like the example shown below.
1234.jpg C:\MyData\2018\2018-02
This would be a problem for me because I need XYplorer to perform the fishing around for the files within all 5 sub-folders. In other words, I just want to provide XYplorer this much of the path: C:\MyData\2018 and then have XYplorer drill down from this starting point to locate the file on its own.
Can XYplorer meet my expectations which I have more clearly defined? Thank you for your time.
Thank you for the post. I'm sorry for any confusion I may have caused by mentioning two files as an example while also mentioning the text file contains 300 file names. My intention is to have XYPlorer move all file names contained in the Control File Name List text file and not only two files.
Just to confirm, for the TEXT file does XYPlorer require I write the File Name and also include the path as shown in the example below?
1234.jpg C:\MyData\2018
Or is it enough to just provided XYplorer the File Name within the text file as shown in the example below?
1234.jpg
Lastly, does XYplorer require I write down the entire full path of file I need moved? Like the example shown below.
1234.jpg C:\MyData\2018\2018-02
This would be a problem for me because I need XYplorer to perform the fishing around for the files within all 5 sub-folders. In other words, I just want to provide XYplorer this much of the path: C:\MyData\2018 and then have XYplorer drill down from this starting point to locate the file on its own.
Can XYplorer meet my expectations which I have more clearly defined? Thank you for your time.
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Are Control File Name Lists supported?
The control list file only contains file names (with NO path) and you want XY to search for these file names recursively inside a previously defined root path and move them (if they are found) to a predefined destination folder. Correct? This isn't possible with one simple
But the whole thing can be scripted easily and it would be reasonable fast.
moveto because it requires full path entries.But the whole thing can be scripted easily and it would be reasonable fast.
quicksearch() for all items in the source root folder to build a list of all existing files in it and then loop over the .csv / .txt file entries and build a list of matching items. At the end a moveto command to bring all these items into the destination folder...One of my scripts helped you out? Please donate via Paypal
-
binar
- Posts: 21
- Joined: 11 Aug 2013 05:32
Re: Are Control File Name Lists supported?
Correct. I need XY to drill down a single ROOT folder containing various sub-folders. The orchestra conductor in this operation is the Control Filename List text file. This text file directs XY what filenames it needs to find by drilling down into the ROOT folder. I agree with you this can probably be handled by using the command. Additionally, the command is probably the correct command to direct XY to move the file over to the destination folder.
In short, you have convinced me XY can perform the task I need done. My only concern relates to coding the XY script because I am not a coder. Do you know what coding language XY is using for its script coding? Do you think XY Technical Support department can help me out with coding the script I need to make it work in the way I have described? Are there any XY tutorial links I can look at to get an idea of the complexity that is involved in coding an XY scipt? Thanks for your time.
Code: Select all
quicksearch() Code: Select all
movetoIn short, you have convinced me XY can perform the task I need done. My only concern relates to coding the XY script because I am not a coder. Do you know what coding language XY is using for its script coding? Do you think XY Technical Support department can help me out with coding the script I need to make it work in the way I have described? Are there any XY tutorial links I can look at to get an idea of the complexity that is involved in coding an XY scipt? Thanks for your time.
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Are Control File Name Lists supported?
Code: Select all
// Select the .txt file that contains the item(s) to move
// If it is a .csv file, it should contain only one column and no column header!
$srcRoot = "C:\MyData";
$dstRoot = "C:\Important_Files\Destination_Folder";
// ========================================================================
// == DO NOT CHANGE ANYTHING BELOW IF YOU DO NOT KNOW WHAT YOU ARE DOING ==
// ========================================================================
$files = quicksearch("/f", $srcRoot, , "s");
$content = readfile(<curitem>);
$toMove = "";
foreach($file, $content, <crlf>, "e") {
$escaped = regexreplace($file, "([\\.+(){\[^$])", "\$1");
$matches = regexmatches($files, "^.*\\" . $escaped . "$", <crlf>);
$toMove .= $matches . <crlf>;
}
if ($toMove) {
$tmpFile = "%TEMP%\~XY_Move_files.txt";
writefile($tmpFile, $toMove, , "UTF8");
// Create destination folder if it does not exist
// No autorichop
// Suffix if file exists
// Show progress
moveto $dstRoot, "*$tmpFile", , 2, 2, 4, 11:=1;
}
One of my scripts helped you out? Please donate via Paypal
-
binar
- Posts: 21
- Joined: 11 Aug 2013 05:32
Re: Are Control File Name Lists supported?
Wow, I wasn't expecting a post that includes the code. Please give me a day or so to test it out and I will get back to you regarding a donation. For now, thank you for your post.
-
binar
- Posts: 21
- Joined: 11 Aug 2013 05:32
Re: Are Control File Name Lists supported?
Thanks Highend,
I tested the script and it works perfectly. Sent you a message to your PP. BTW, what is the programming language used for all XYplorer scripts?
I tested the script and it works perfectly. Sent you a message to your PP. BTW, what is the programming language used for all XYplorer scripts?
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Are Control File Name Lists supported?
Thanks! The scripting language is XYs own but it copies a few concepts of php.
One of my scripts helped you out? Please donate via Paypal
XYplorer Beta Club