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

Popular posts from this blog

Error: 0x80073701 when trying to add Print Services Role in Windows 2012 Standard

Disconnecting from a Windows Server 2012 R2 file sharing session on a Windows 7,8,10 machine

Event ID 64,77,1008 Certificates Events Windows Server 2008, 2008R2