Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I have about 150 files moved to a specific folder on a nightly basis. From here, these files get loaded into the database. The file extension uses a date and time stamp. A series of files will look similar to this.
js00001.20080927230016
js00002.20080927230114
js00003.20080927231010
js00004.20080927231155In order for each file to be loaded into the database, a blank flag file is needed for each file.
For example, the first file contains all the data, and this file requires the blank second file to kick off the load proccess. The second file needs the exact same file name, except with an flg file extension as listed below.
js00001.20080927230016
js00001.20080927230016.flgIs there a way in DOS to create every flg file in one shot after the original files get moved to the folder?

Hi
This help.@echo off
dir /b Folder\ > Files.txt
for /f "tokens=* delims=" %%a in (Files.txt) do (
type nul >Folder\%%a.flg
)

Provided this is the xp cmd shell(as per the listed details) and not real dos....
The temp file could be removed:
@echo off
cd /d <drive:\path\folder>
for %%g in (*) do type nul>%%~nxg.flg

Thanks for you help DTECH10 and JUDAGO!
Both sets of commands word equally as well.
Your help is much appreciated!

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |