#packages
import os
import shutil
import xlsxwriter

path_folder = "C:\\Users\\neiln\\Downloads"

def listDir(dir):
    workbook = xlsxwriter.Workbook('App Zip Data.xlsx')
    worksheet = workbook.add_worksheet("All_App_Location")
    k = 1
    status = 0
    fileNames = os.listdir(dir)
    for i in fileNames:
        if i.endswith('.apk.zip'):
            worksheet.write('A' + str(k), os.path.abspath(os.path.join(dir,i)))
            k += 1
            status =1
    workbook.close()
    if(status ==1):
        shutil.move("D:\\Project\\Privacy Detection\\App Zip Data.xlsx", "D:\\Project\\Privacy Detection\\Apps\\Excel Sheets")

def request():
    path = "D:\\Project\\Privacy Detection\\Apps\\Excel Sheets\\App Zip Data.xlsx"
    return (path)
