Saved Bookmarks
| 1. |
Solve : Batch File text export? |
|
Answer» Hello folks, I have my bat file that list files in the directory but I then need to export this list to a txt file and save it. You didn't show your instruction that lists files. I PRESUME DIR *.xxx where xxx is the suffix of files you are interested in. OK, try this DIR *.xxx /b >MyDIR.txt The "/b" is to get rid of extra stuff you don't need. Mac Thanks. That workd great. Just got to do the sql BIT now. Cheers Hey Mac, Doh. When I import this to sql it seems I need to get the full directory listing ie... G:\share\CRS\FTPDownloads\MyFilename.txt The batch file I created is: dir G:\share\CRS\FTPDownloads/b>G:\share\CRS\CDSDataImport.txt This just gives me MyFilename.txt Do you know if this is possible to do? CheersAdd the /s after the /b, this means - search subdirectories, but it will also give you the full path DIR *.xxx /b /s >MyDIR.txt If you do have subdirectories in this folder, then the files in there will be listed too. Graham Cheers Graham. You are a pro!!!!!!!!!! |
|