I paste this Powershell single-line script into a text file in my root directories for easy cut-paste access from any computer. (I also keep a snippets file, but I use this enough that it's convenient.):
Code: Select all
Out-File paper_XY_longfilepath.txt ; cmd /c "dir /b /s /a" | ForEach-Object { if ($_.length -gt 250) {$_ | Out-File -append paper_XY_longfilepath.txt}}
You may not want to run this from C:\ (or wherever else you have long system folders). If you do, you'll need to run Powershell as an administrator to avoid errors; this does recurse all subdirectories.
I prepared by putting the paper folder icon on my customize->toolbar. I also like having a column that shows "Len".
- Open Powershell (elevated as required) from the directory you want to check; paste the snippet into the window and run it. It's very fast.
Copy the resulting .txt file to <XYPLORER>\Paper\
Hit the Paper Airplane icon to open "paper_XY_longfilepath.txt" as a paper folder.
Enjoy XY's ability to manage long paths and arbitrary file locations gracefully.
If you want to run the command from multiple locations, simply rename the resulting .txt files before move, or cut and paste the results into the first file.
You may or may not wish to edit the resulting file before opening as a paper folder, especially if there are system files or the length has gotten silly. (I like EditPad Lite because of its excellent regex and full line support. I also use "Everything" if I've used this in several locations, before renaming and moving en masse to the paper folder.)
XYplorer Beta Club