dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
files/windows/nilesoft/imports/file-manage.nss (4053B)
1menu(where=sel.count>0 type='file|dir|drive|namespace|back' mode="multiple" title='File manage' image=\uE253)
2{
3 menu(separator="after" title=title.copy_path image=icon.copy_path)
4 {
5 item(where=sel.count > 1 title='Copy (@sel.count) items selected' cmd=command.copy(sel(false, "\n")))
6 item(mode="single" title=@sel.path tip=sel.path cmd=command.copy(sel.path))
7 item(mode="single" type='file' separator="before" find='.lnk' title='open file location')
8 separator
9 item(mode="single" where=@sel.parent.len>3 title=sel.parent cmd=@command.copy(sel.parent))
10 separator
11 item(mode="single" type='file|dir|back.dir' title=sel.file.name cmd=command.copy(sel.file.name))
12 item(mode="single" type='file' where=sel.file.len != sel.file.title.len title=@sel.file.title cmd=command.copy(sel.file.title))
13 item(mode="single" type='file' where=sel.file.ext.len>0 title=sel.file.ext cmd=command.copy(sel.file.ext))
14 }
15
16 item(mode="single" type="file" title="Change extension" image=\uE0B5 cmd=if(input("Change extension", "Type extension"),
17 io.rename(sel.path, path.join(sel.dir, sel.file.title + "." + input.result))))
18
19 menu(separator="after" image=\uE290 title=title.select)
20 {
21 item(title="All" image=icon.select_all cmd=command.select_all)
22 item(title="Invert" image=icon.invert_selection cmd=command.invert_selection)
23 item(title="None" image=icon.select_none cmd=command.select_none)
24 }
25
26 item(type='file|dir|back.dir|drive' title='Take ownership' image=[\uE194,#f00] admin
27 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")')
28 separator
29 menu(title="Show/Hide" image=icon.show_hidden_files)
30 {
31 item(title="System files" image=inherit cmd='@command.togglehidden')
32 item(title="File name extensions" image=icon.show_file_extensions cmd='@command.toggleext')
33 }
34
35 menu(type='file|dir|back.dir' mode="single" title='Attributes' image=icon.properties)
36 {
37 $atrr = io.attributes(sel.path)
38 item(title='Hidden' checked=io.attribute.hidden(atrr)
39 cmd args='/c ATTRIB @if(io.attribute.hidden(atrr),"-","+")H "@sel.path"' window=hidden)
40
41 item(title='System' checked=io.attribute.system(atrr)
42 cmd args='/c ATTRIB @if(io.attribute.system(atrr),"-","+")S "@sel.path"' window=hidden)
43
44 item(title='Read-Only' checked=io.attribute.readonly(atrr)
45 cmd args='/c ATTRIB @if(io.attribute.readonly(atrr),"-","+")R "@sel.path"' window=hidden)
46
47 item(title='Archive' checked=io.attribute.archive(atrr)
48 cmd args='/c ATTRIB @if(io.attribute.archive(atrr),"-","+")A "@sel.path"' window=hidden)
49 separator
50 item(title="Created" keys=io.dt.created(sel.path, 'y/m/d') cmd=io.dt.created(sel.path,2000,1,1) vis=label)
51 item(title="Modified" keys=io.dt.modified(sel.path, 'y/m/d') cmd=io.dt.modified(sel.path,2000,1,1) vis=label)
52 item(title="Accessed" keys=io.dt.accessed(sel.path, 'y/m/d') cmd=io.dt.accessed(sel.path,2000,1,1) vis=label)
53 }
54
55 menu(mode="single" type='file' find='.dll|.ocx' separator="before" title='Register Server' image=\uea86)
56 {
57 item(title='Register' admin cmd='regsvr32.exe' args='@sel.path.quote' invoke="multiple")
58 item(title='Unregister' admin cmd='regsvr32.exe' args='/u @sel.path.quote' invoke="multiple")
59 }
60
61 menu(mode="single" type='back' expanded=true)
62 {
63 menu(separator="before" title='New Folder' image=icon.new_folder)
64 {
65 item(title='DateTime' cmd=io.dir.create(sys.datetime("ymdHMSs")))
66 item(title='Guid' cmd=io.dir.create(str.guid))
67 }
68
69 menu(title='New File' image=icon.new_file)
70 {
71 $dt = sys.datetime("ymdHMSs")
72 item(title='TXT' cmd=io.file.create('@(dt).txt', 'Hello World!'))
73 item(title='XML' cmd=io.file.create('@(dt).xml', '<root>Hello World!</root>'))
74 item(title='JSON' cmd=io.file.create('@(dt).json', '[]'))
75 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>"))
76 }
77 }
78
79 item(where=!wnd.is_desktop title=title.folder_options image=icon.folder_options cmd=command.folder_options)
80}