Hi.
I'm trying to find a way to send selected files, from a FIND window, with different paths, to a txt file. It could be used the Kenneth R. Alcock's UserCommand as template. UserCommand2 (Opus 9 default UserCommand) lists files and folders from current directory.
[code]Runmode Hide
@nofilenamequoting
@firstfileonly
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: ::
:: PrintTree ::
:: Directory Opus 8 User Command wrapper for Tree.com ::
:: Version: 2.0 ::
:: Kenneth R. Alcock ::
:: ::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:Start
@Echo OFF & If /i NOT [%OS%]==[Windows_NT] Goto 95-98-ME
Title Folder Tree Report
:SetVars
Call Set ReportPath={sourcepath$|noterm}
Call Set Filename=Folder Tree Report--{Date|yyyy'-'MM'-'yy}-{Time|HH'.'mm'.'ss}.txt
Call Set Files=&FILES&
Call Set PassedPath=&PATH&
If .%Files%.==.1. (
Call Set TreeParams=/A /F
) Else (
Call Set TreeParams=/A
)
If Defined PassedPath (
If Not Exist "%PassedPath%." (
Call Set BadPath=TRUE
) Else (
Call Set ReportPath=%PassedPath%
)
)
:Report
> "%TEMP%%Filename%" Echo.Date: {Date|yyyy'-'MM'-'yy} {Time|HH':'mm':'ss}
>> "%TEMP%%Filename%" Echo.
If Defined BadPath (
>> "%TEMP%%Filename%" Echo. Invalid Path Passed!
>> "%TEMP%%Filename%" Echo. %PassedPath%
) Else (
>> "%TEMP%%Filename%" Tree /F %TreeParams% "%ReportPath%"
)
Start /wait "Notepad" Notepad "%TEMP%%Filename%"
Del /Q "%TEMP%%Filename%" > Nul
Goto :EOF
[/code]
Problems are:
1 - it lists ALL files.
2 - it list files from only one folder.
Questions are:
1 - How to list ONLY selected files from the FIND window?
2 - This window may has files from different folders.
3 - This list must go to Clipboard or a txt file.
I know these are a batch commands. Is it possible to select files and make a list using batch commands? (loops, for, if, else?)
The solution may come from Opus Commands, or other. If it attendts the requested task...
.