Computing.Net > Forums > Programming > DOS File Creation

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

DOS File Creation

Reply to Message Icon

Name: skisalomon77
Date: September 27, 2008 at 13:37:27 Pacific
OS: XP Pro
CPU/Ram: Intel/2BG
Product: Dell
Comment:

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.20080927231155

In 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.flg

Is there a way in DOS to create every flg file in one shot after the original files get moved to the folder?



Sponsored Link
Ads by Google

Response Number 1
Name: dtech10
Date: September 27, 2008 at 15:26:14 Pacific
Reply:

Hi
This help.

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


0

Response Number 2
Name: Judago
Date: September 27, 2008 at 18:24:42 Pacific
Reply:

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


0

Response Number 3
Name: skisalomon77
Date: September 28, 2008 at 18:58:09 Pacific
Reply:

Thanks for you help DTECH10 and JUDAGO!

Both sets of commands word equally as well.

Your help is much appreciated!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: DOS File Creation

Old dos file www.computing.net/answers/programming/old-dos-file/725.html

FIND Length of DOS File name? www.computing.net/answers/programming/find-length-of-dos-file-name/19361.html

Temp File Creations www.computing.net/answers/programming/temp-file-creations/19619.html