Computing.Net > Forums > Windows XP > xp batch script question

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.

xp batch script question

Reply to Message Icon

Name: BabaG
Date: January 24, 2007 at 19:15:35 Pacific
OS: xp home sp2
CPU/Ram: athlon 3200/2gb
Product: compaq
Comment:

i have a script which watches a folder for new files to appear. when a new file does appear, i want to be able to put its filename into a variable that i can use in other parts of the script.

example would be that folder x has 10 files in it.

when file 11 arrives, the filename is read into variable y so that the script can later say things like:

copy y to folder z,
move y to folder a,
loop back to monitoring for new input.

all the examples i see for parsing a filename seem to come from user input rather than something read from within the system.

thanks for any help or linlks,
BabaG



Sponsored Link
Ads by Google

Response Number 1
Name: Ed in Texas.
Date: January 25, 2007 at 02:01:19 Pacific
Reply:

BabaG, it's been YEARS since I did any serious programming so this might be way out of date. Back then, a variable defaulted to a numeruc variable and you had to specifically state that variable 'y' was a string variable capable of accepting alpha data. Maybe??
HTH.
Ed in Texas.


0

Response Number 2
Name: Lucid
Date: January 26, 2007 at 13:09:07 Pacific
Reply:

Why don't you have your script do something like this...

Read the contents of FolderX and put the current list into a text file somewhere.

Have the script compare the contents of FolderX with the list as needed. If there are new files, process them as desired, and generate a new text file with the updated FolderX contents...


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 Windows XP Forum Home


Sponsored links

Ads by Google


Results for: xp batch script question

batch script question www.computing.net/answers/windows-xp/batch-script-question/142196.html

XP Batch Scripting www.computing.net/answers/windows-xp/xp-batch-scripting/97340.html

XP Batch Scripting www.computing.net/answers/windows-xp/xp-batch-scripting/97335.html