Create a CSV Queue and move to other folder
hello,
i want accomplish following:
1. load csv file lowest diget queue folder
2. rename csv file
3. place csv in queue processing folder
4. process csv file
5. rename csv original name
6. move csv processed/finished folder
can me this?
thanks.
olaf.
ok, im going assume 1 thing, c:\csvunprocessed contains csv files julian name format.... if there other things in there, not work expected.
$queue = "c:\csvqueue"
$procfile = gci -path "c:|csvunprocessed" *.csv | sort | select -first 1
$orgname = $procfile.name
move-item $procfile "$queue\input.csv"
....process
move-item "$queue\input.csv" "c:\csvprocessed\$orgname"
that should it...
Windows Server > Windows PowerShell
Comments
Post a Comment