You are here: PSPad forum > English discussion forum > How to save all Paths? (partition letter E-Z)
Posted by: maki | Date: 2014-09-24 08:51 | IP: IP Logged
I still do not understand?
I know a few best developers to write several scripts and all times improve - because they know it does not work perfectly
Save Names With Path (Partition Letter + Folders(SubFolders) + Filenames + Extension)
F:\Folder\SubFolder\Subfolder(2)\PSPad.exe
W:\Folder\SubFolder\Subfolder(2)\Subfolder(3)\Subfolder(4)\FOX.PDF (Unlimited DEPTH)
------------------------------------------------------
Write just did not know how to write the script - and the more I will not ask about it
Edited 7 time(s). Last edit at 2014-09-24 08:56 by maki.
Posted by: pspad | Date: 2014-09-24 11:54 | IP: IP Logged
Stupid and easy solution for somebody, show is not familier with scripts.
Copy content as bat or cmd file, modify path for your file with result (first line) and run.
Quote:set List=i:\List.txt
dir A:\*.* /s /b >%List%
dir B:\*.* /s /b >>%List%
dir C:\*.* /s /b >>%List%
dir D:\*.* /s /b >>%List%
dir E:\*.* /s /b >>%List%
dir F:\*.* /s /b >>%List%
dir G:\*.* /s /b >>%List%
dir H:\*.* /s /b >>%List%
dir I:\*.* /s /b >>%List%
dir J:\*.* /s /b >>%List%
dir K:\*.* /s /b >>%List%
dir L:\*.* /s /b >>%List%
dir M:\*.* /s /b >>%List%
dir N:\*.* /s /b >>%List%
dir O:\*.* /s /b >>%List%
dir P:\*.* /s /b >>%List%
dir Q:\*.* /s /b >>%List%
dir R:\*.* /s /b >>%List%
dir S:\*.* /s /b >>%List%
dir T:\*.* /s /b >>%List%
dir U:\*.* /s /b >>%List%
dir V:\*.* /s /b >>%List%
dir W:\*.* /s /b >>%List%
dir X:\*.* /s /b >>%List%
dir Y:\*.* /s /b >>%List%
dir Z:\*.* /s /b >>%List%
Posted by: maki | Date: 2014-09-24 13:48 | IP: IP Logged
pspad:set List=D:\List.txt
dir D:\*.* /s /b >>%List%
Please understand that Your Scrypt not work properly (this was confirmed by several developers)
Do not work write all paths
and CMD (NOT SAVE UNICODE)
Better script PowerShell - 99% work (little defect)
Edited 3 time(s). Last edit at 2014-09-24 13:50 by maki.
Posted by: maki | Date: 2014-09-24 14:02 | IP: IP Logged
Function GetFileNames([string]$path, [string]$outputFile) {
$list = Get-ChildItem $path -Recurse
$list | Select-Object FullName | Export-Csv $outputFile -Encoding UTF8
}
GetFileNames ".\" "C:\Output.csv"
-------------------------
PS K:\> + $list = Get-ChildItem $path -Recurse
At line:1 char:1
+ + $list = Get-ChildItem $path -Recurse
+ ~~~~~~~~~
The assignment expression is not valid. The input to an assignment operator must be an object that is able to accept as
signments, such as a variable or a property.
+ CategoryInfo : ParserError: ( [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : InvalidLeftHandSide
PS K:\> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At line:1 char:2
+ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~
Missing expression after unary operator '+'.
At line:1 char:13
+ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token '~~~~~~~~~~~~~~~~~~~~~~~~~~~~' in expression or statement.
+ CategoryInfo : ParserError: ( [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingExpressionAfterOperator
PS K:\> ion
ion : The term 'ion' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the s
pelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:4
+ ion
+ ~~~
+ CategoryInfo : ObjectNotFound: (ion:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Original-(ERROR Polish)
PS K:\> At line:2 char:11
Nieprawidłowe polecenie.
Polecenia i programy usługi planowania poleceń AT do uruchomienia na
komputerze o określonej godzinie i dacie. Usługa Harmonogram musi być
uruchomiona, aby używać poleceń AT.
Posted by: Andreas | Date: 2014-09-24 14:03 | IP: IP Logged
maki:Save Names With Path (Partition Letter + Folders(SubFolders) + Filenames + Extension)
Usually this are developers who work with an editor and developers know how to explain a problem, also in english.
It seems that you don't know, that an editor can not save a Path, a Name or whatever. An editor only can save a file. But that's only one example of your inaccuracy or ignorance. Others are: writing weird stuff in telegram style, not answering questions and not to do what was told you.
Posted by: maki | Date: 2014-09-24 14:05 | IP: IP Logged
Andreas - ?
Posted by: pspad | Date: 2014-09-24 14:28 | IP: IP Logged
maki:Please understand that Your Scrypt not work properly (this was confirmed by several developers)
Do not work write all paths
and CMD (NOT SAVE UNICODE)Better script PowerShell - 99% work (little defect)
Without example what file isn't saved, I cant help you.
If you want to save result in UTF-8, add following line to the begin:
Quote:chcp 65001
Command DIR has more switches and help. E.g. if you want to list all files include hidden ones, add /A switch
Quote:chcp 65001
set List=D:\List.txt
dir D:\*.* /s /b /a >%List%
will list all files include hidden
Please meke difference between > and >>
> creates file
>> add content to existing file
Each advice suppose you wont use copy/paste, but you will think. World is full of copy/paste people
Posted by: maki | Date: 2014-09-24 14:51 | IP: IP Logged
Quote:chcp 65001
set List=D:\List.txt
dir D:\*.* /s /b /a >%List%
Create Log (NOT FULL PATH)
k:\ALL 2\WWW.DATA.CC_2012年4酒吧流行舞曲资源_C
----------------------------------------------------------
FULL PATH
K:\ALL 2\WWW.DATA.CC_2012年4酒吧流行舞曲资源_C\WWW.data.CC_2012年4月份酒吧流行舞曲资源_C.rar
Edited 1 time(s). Last edit at 2014-09-24 14:52 by maki.
Posted by: pspad | Date: 2014-09-24 15:13 | IP: IP Logged
If in your list file isn't whole file name, in this case soomething wrong is with your operating system.
I created your file in c:\TMP folder
I run command in c:\tmp folder:
chcp 65001
dir *.rar /b /s >list.txt
and the result is on screenshot. You can se there whole file name.
It means my script works but your oprating system not.
Posted by: maki | Date: 2014-09-24 15:33 | IP: IP Logged
That's right from the beginning I said no That script is not working but no one believes to me because in them the script works.
But everyone has a different operating system, and Not necessarily Native ENGLISH and other problems with this result.
And if the extension is 1000? jpg, rar, zip, ini, pdf, flv, mp4, and many more (even the unpopular)
Not only *.RAR
Polish Oper. System
Edited 1 time(s). Last edit at 2014-09-24 15:35 by maki.
Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR