Missing '=' operator after key in hash literal

I have powershell 4.0 running on windows server 2012 R2 . I want to extract several files from the source folder to destination folder. I have the list of files in CSV template. When I ran the script I got an error like this: Missing '=' operator after key in hash literal. I don;t know what i am doing wrong. Here is my script:

##The external CSV template is like this:

    "C:\Data_Files\fileone.$TodayDate" = "E:\DEV\_Datafiles\fileone_Extracted"       
    "C:\Data_Files\filetwo.$TodayDate" = "E:\DEV\_Datafiles\filetwo_Extracted"      
    "C:\Data_Files\filethree.$TodayDate" = "E:\DEV\_Datafiles\filethree_Extracted"      
    "C:\Data_Files\filefour.$TodayDate" = "E:\DEV\_Datafiles\filefour_Extracted"         
    "C:\Data_Files\filefive.$TodayDate" = "E:\DEV\_Datafiles\filefive_Extracted"

## Call the CSV

$ZipFiles  = Import-csv "c:\PowershellScript\ZipFileFolders.csv"

$ZipFilesAndFolders = @{$ZipFiles}

foreach ($KeyAndValue in $ZipFilesAndFolders.GetEnumerator())
       $ZipFilePath = $KeyAndValue.Key
        $DestinationPath = $KeyAndValue.Value

        echo "-------------------------------------------"
        echo "start extracting"
        Get-ChildItem $ZipFilePath | % {& "E:\7-Zip\7za.exe" "x" $_.fullname "-o$DestinationPath"}        
       echo "Finish extracting $Dept_name"
       echo "--------------------------------------------"

What am I doing wrong? Please help

Parents Reply Children
No Data