does anyone know the commandline syntax to execute the above but NOT include
the date, time and filesize in the export?? I know want an alphabetical
listing of the filenames.
Ideally it would be able to export two columns from one filename. IE:
family would be in one column and pictures in the second.
There are minor differences in the dir command. XP has an /x switch
for instance.
Typing: dir /?
will bring up the help screen.
"dir /b > info.xml" returns a list of files only.
"dir /b /s > info.xml" does the same, but also includes a
full path for each file.
The default is to return a list alphabetically sorted.
Using the switch: /A:-D
stops subdirectories from being listed in XP. Otherwise, in my case
the two subdirectories, "C:\BIN" and "C:\BIN\temp" are listed as
files.
"dir /b /s /A:-D> info.xml" returns:
C:\BIN\Pkunzip.exe
C:\BIN\PKUNZJR.COM
C:\BIN\Pkzip.exe
C:\BIN\Pkzip25.exe
C:\BIN\Pkzipfix.exe
C:\BIN\result.txt
C:\BIN\temp
C:\BIN\temp2
C:\BIN\Whereis.com
C:\BIN\Zip2exe.exe
C:\BIN\temp\fastcomp.ex_ [<- start of subdir "temp"]
C:\BIN\temp\file_id.diz
C:\BIN\temp\License.txt
C:\BIN\temp\ocsfxp50.htm
C:\BIN\temp\ocsfxp50.xml
C:\BIN\temp\ocsfxp5a.zip
C:\BIN\temp\ocsfxpak.hl_
C:\BIN\temp\OcsReg.exe
C:\BIN\temp\opsoft.ur_
C:\BIN\temp\Order.txt
C:\BIN\temp\par148.exe
C:\BIN\temp\ReadMe.txt
C:\BIN\temp\Setup.exe
C:\BIN\temp\setup.ex_
This could work out for you. Using search and replace "C:\" with
nothing.
BIN\Pkunzip.exe
BIN\PKUNZJR.COM
BIN\Pkzip.exe
BIN\Pkzip25.exe
BIN\Pkzipfix.exe
BIN\result.txt
BIN\Whereis.com
BIN\Zip2exe.exe
BIN\temp\fastcomp.ex_ [<- start of subdir "temp"]
BIN\temp\file_id.diz
BIN\temp\License.txt
BIN\temp\ocsfxp50.htm
BIN\temp\ocsfxp50.xml
BIN\temp\ocsfxp5a.zip
BIN\temp\ocsfxpak.hl_
BIN\temp\OcsReg.exe
BIN\temp\opsoft.ur_
BIN\temp\Order.txt
BIN\temp\par148.exe
BIN\temp\ReadMe.txt
BIN\temp\Setup.exe
BIN\temp\setup.ex_
If you don't have subdirectories you won't have to do this. Search and
replace "BIN\temp" with "temp":
BIN\Pkunzip.exe
BIN\PKUNZJR.COM
BIN\Pkzip.exe
BIN\Pkzip25.exe
BIN\Pkzipfix.exe
BIN\result.txt
BIN\Whereis.com
BIN\Zip2exe.exe
temp\fastcomp.ex_
temp\file_id.diz
temp\License.txt
temp\ocsfxp50.htm
temp\ocsfxp50.xml
temp\ocsfxp5a.zip
temp\ocsfxpak.hl_
temp\OcsReg.exe
temp\opsoft.ur_
temp\Order.txt
temp\par148.exe
temp\ReadMe.txt
temp\Setup.exe
temp\setup.ex_
Then simply search and replace all '\' characters with space
characters.
BIN Pkunzip.exe
BIN PKUNZJR.COM
BIN Pkzip.exe
BIN Pkzip25.exe
BIN Pkzipfix.exe
BIN result.txt
BIN Whereis.com
BIN Zip2exe.exe
temp fastcomp.ex_
temp file_id.diz
temp License.txt
temp ocsfxp50.htm
temp ocsfxp50.xml
temp ocsfxp5a.zip
temp ocsfxpak.hl_
temp OcsReg.exe
temp opsoft.ur_
temp Order.txt
temp par148.exe
temp ReadMe.txt
temp Setup.exe
temp setup.ex_
That's a bit more involved than I imagined. Its been too long since I
tried writing batch and the old retention rate isn't what it used to
be.
If no one has a better method of writing a script yourself I can
highly recommend the two "msdos.batch" newsgroups for an eloquent
solution and explanation of each step of the solution. Include your OS
version for very friendly advise on batch.
alt.msdos.batch (win 9x-me)
alt.msdos.batch.nt (2000+)