Advertisement
krzxsiek

file-manage.nss

Oct 4th, 2023
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.28 KB | None | 0 0
  1. menu(where=sel.count>0 && sel.file.name!='Kosz' type='file|dir|drive|namespace|back' mode="multiple" title='File Manage' image=\uE253 pos=2)
  2. {
  3.  
  4. item(title="Edytuj w Sublime Text" mode='single' type='file' where= str.find('.php|.html|.css', sel.file.ext)>0 or sel.file.ext.len==0 image='C:\#Wazne\Ikony\sublime-text.png' cmd='C:\Program Files\Sublime Text\sublime_text.exe' args='"@sel.path"' sep="bottom")
  5.  
  6. menu(separator="after" title=title.copy_path image=icon.copy_path)
  7. {
  8. item(where=sel.count > 1 title='Copy (@sel.count) items selected' cmd=command.copy(sel(false, "\n")))
  9. item(mode="single" title=@sel.path tip=sel.path cmd=command.copy(sel.path))
  10. item(mode="single" type='file' separator="before" find='.lnk' title='open file location')
  11. separator
  12. item(mode="single" where=@sel.parent.len>3 title=sel.parent cmd=@command.copy(sel.parent))
  13. separator
  14. item(mode="single" type='file|dir|back.dir' title=sel.file.name cmd=command.copy(sel.file.name))
  15. item(mode="single" type='file' where=sel.file.len != sel.file.title.len title=@sel.file.title cmd=command.copy(sel.file.title))
  16. item(mode="single" type='file' where=sel.file.ext.len>0 title=sel.file.ext cmd=command.copy(sel.file.ext))
  17. }
  18.  
  19. item(mode="single" type="file" title="Change extension" image=\uE0B5 cmd=if(input("Change extension", "Type extension"),
  20. io.rename(sel.path, path.join(sel.dir, sel.file.title + "." + input.result))))
  21.  
  22. menu(separator="after" image=\uE290 title=title.select)
  23. {
  24. item(title="All" image=icon.select_all cmd=command.select_all)
  25. item(title="Invert" image=icon.invert_selection cmd=command.invert_selection)
  26. item(title="None" image=icon.select_none cmd=command.select_none)
  27. }
  28.  
  29. item(type='file|dir|back.dir|drive' title='Take Ownership' image=[\uE194,#f00] admin
  30. cmd args='/K takeown /f "@sel.path" @if(sel.type==1,null,"/r /d y") && icacls "@sel.path" /grant *S-1-5-32-544:F @if(sel.type==1,"/c /l","/t /c /l /q")')
  31. separator
  32. menu(title="Pokaż/Ukryj" image=icon.show_hidden_files)
  33. {
  34. item(title="System files" image=inherit cmd='@command.togglehidden')
  35. item(title="File name extensions" image=icon.show_file_extensions cmd='@command.toggleext')
  36. }
  37.  
  38. menu(type='file|dir|back.dir' mode="single" title='Atrybuty')
  39. {
  40. $atrr = io.attributes(sel.path)
  41. item(title='Hidden' checked=io.attribute.hidden(atrr)
  42. cmd args='/c ATTRIB @if(io.attribute.hidden(atrr),"-","+")H "@sel.path"' window=hidden)
  43.  
  44. item(title='System' checked=io.attribute.system(atrr)
  45. cmd args='/c ATTRIB @if(io.attribute.system(atrr),"-","+")S "@sel.path"' window=hidden)
  46.  
  47. item(title='Read-Only' checked=io.attribute.readonly(atrr)
  48. cmd args='/c ATTRIB @if(io.attribute.readonly(atrr),"-","+")R "@sel.path"' window=hidden)
  49.  
  50. item(title='Archive' checked=io.attribute.archive(atrr)
  51. cmd args='/c ATTRIB @if(io.attribute.archive(atrr),"-","+")A "@sel.path"' window=hidden)
  52. separator
  53. item(title="CREATED" keys=io.dt.created(sel.path, 'y/m/d') cmd=io.dt.created(sel.path,2000,1,1))
  54. item(title="MODIFIED" keys=io.dt.modified(sel.path, 'y/m/d') cmd=io.dt.modified(sel.path,2000,1,1))
  55. item(title="ACCESSED" keys=io.dt.accessed(sel.path, 'y/m/d') cmd=io.dt.accessed(sel.path,2000,1,1))
  56. }
  57.  
  58. menu(mode="single" type='file' find='.dll|.ocx' separator="before" title='Register Server' image=\uea86)
  59. {
  60. item(title='Register' admin cmd='regsvr32.exe' args='@sel.path.quote' invoke="multiple")
  61. item(title='Unregister' admin cmd='regsvr32.exe' args='/u @sel.path.quote' invoke="multiple")
  62. }
  63.  
  64. menu(mode="single" type='back' expanded=true)
  65. {
  66. menu(separator="before" title='New Folder' image=icon.new_folder)
  67. {
  68. item(title='DateTime' cmd=io.dir.create(sys.datetime("ymdHMSs")))
  69. item(title='Guid' cmd=io.dir.create(str.guid))
  70. }
  71.  
  72. menu(title='New File' image=icon.new_file)
  73. {
  74. $dt = sys.datetime("ymdHMSs")
  75. item(title='TXT' cmd=io.file.create('@(dt).txt', 'Hello World!'))
  76. item(title='XML' cmd=io.file.create('@(dt).xml', '<root>Hello World!</root>'))
  77. item(title='JSON' cmd=io.file.create('@(dt).json', '[]'))
  78. item(title='HTML' cmd=io.file.create('@(dt).html', "<html>\n\t<head>\n\t</head>\n\t<body>Hello World!\n\t</body>\n</html>"))
  79. }
  80. }
  81.  
  82. item(where=!wnd.is_desktop title=title.folder_options image=icon.folder_options cmd=command.folder_options)
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement