Dreamslogic
asked on
Batch file path issue - URGENT
Hi there,
Thanks once again.
Issue is my PLUSales files are inside the StoreFiles(Directory). IMy Productcatalog is working fine but PLUSale need some changes
FileSystem Struture:
StoreFiles(Directory) --> ProdcutCatalog.csv
StoreFiles(Directory) --> PLUSales(Folder1) --> PLUSales1.csv
StoreFiles(Directory) --> PLUSales(Folder2) --> PLUSales3.csv
StoreFiles(Directory) --> PLUSales(Folder2) --> PLUSales4.csv
Solution Required:
OsPos(Directory) --> BUNDABERG (With all Zipped files in this folder)
Script:
set SSIS_FTPFILE_ORG=I:\Inform ation Technology\Retail\Durga\Os Pos\Store Files\
set SSIS_FTPFILE_DEST=I:\Infor mation Technology\Retail\Durga\Os Pos
set LOGFILE=%SSIS_FTPFILE_DEST %zbatlog%c urdate%.tx t
"C:\Program Files\7-zip\7z.exe" a "%SSIS_FTPFILE_DEST%\BUNDA BERG.zip" "%SSIS_FTPFILE_ORG%\Produc tCatalog*. csv" >>"%LOGFILE%"
"C:\Program Files\7-zip\7z.exe" a "%SSIS_FTPFILE_DEST%\BUNDA BERG.zip" "%SSIS_FTPFILE_ORG%\..\Plu Sales*.csv " >>"%LOGFILE%
Please help me its urgent
Thanks,
Thanks for the help,
D
Thanks once again.
Issue is my PLUSales files are inside the StoreFiles(Directory). IMy Productcatalog is working fine but PLUSale need some changes
FileSystem Struture:
StoreFiles(Directory) --> ProdcutCatalog.csv
StoreFiles(Directory) --> PLUSales(Folder1) --> PLUSales1.csv
StoreFiles(Directory) --> PLUSales(Folder2) --> PLUSales3.csv
StoreFiles(Directory) --> PLUSales(Folder2) --> PLUSales4.csv
Solution Required:
OsPos(Directory) --> BUNDABERG (With all Zipped files in this folder)
Script:
set SSIS_FTPFILE_ORG=I:\Inform
set SSIS_FTPFILE_DEST=I:\Infor
set LOGFILE=%SSIS_FTPFILE_DEST
"C:\Program Files\7-zip\7z.exe" a "%SSIS_FTPFILE_DEST%\BUNDA
"C:\Program Files\7-zip\7z.exe" a "%SSIS_FTPFILE_DEST%\BUNDA
Please help me its urgent
Thanks,
Thanks for the help,
D
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi there,
No its not woking, it doesn't do anything. Below is my file struture. I used wild card with 'a' and without 'a' command. Also -r0 command still doesn't work. Any idea. I need to ZIP 40 to 100 GB of data over night. It's urgent any help much appreciated.
FileSystem Struture:
StoreFiles(Directory) --> ProdcutCatalog.csv
StoreFiles(Directory) --> PLUSales(Folder1) --> PLUSales1.csv
StoreFiles(Directory) --> PLUSales(Folder2) --> PLUSales3.csv
StoreFiles(Directory) --> PLUSales(Folder2) --> PLUSales4.csv
No its not woking, it doesn't do anything. Below is my file struture. I used wild card with 'a' and without 'a' command. Also -r0 command still doesn't work. Any idea. I need to ZIP 40 to 100 GB of data over night. It's urgent any help much appreciated.
FileSystem Struture:
StoreFiles(Directory) --> ProdcutCatalog.csv
StoreFiles(Directory) --> PLUSales(Folder1) --> PLUSales1.csv
StoreFiles(Directory) --> PLUSales(Folder2) --> PLUSales3.csv
StoreFiles(Directory) --> PLUSales(Folder2) --> PLUSales4.csv
ASKER
Hi JMiller,
I made changes as you mentioned above but it takes whole subfolder and zip with main. I just need the file inside the subfoler.
BUNDABERG.zip contains subfolder and ProductCatalogfiles.
FileSystem Struture:
StoreFiles(Directory) --> ProdcutCatalog.csv
StoreFiles(Directory) --> PLUSales(Folder1) --> PLUSales1.csv
StoreFiles(Directory) --> PLUSales(Folder2) --> PLUSales3.csv
StoreFiles(Directory) --> PLUSales(Folder2) --> PLUSales4.csv
Solution Required:
OsPos(Directory) --> BUNDABERG (With all Zipped files in this folder) both ProductCatalog and PLUSales
I made changes as you mentioned above but it takes whole subfolder and zip with main. I just need the file inside the subfoler.
BUNDABERG.zip contains subfolder and ProductCatalogfiles.
FileSystem Struture:
StoreFiles(Directory) --> ProdcutCatalog.csv
StoreFiles(Directory) --> PLUSales(Folder1) --> PLUSales1.csv
StoreFiles(Directory) --> PLUSales(Folder2) --> PLUSales3.csv
StoreFiles(Directory) --> PLUSales(Folder2) --> PLUSales4.csv
Solution Required:
OsPos(Directory) --> BUNDABERG (With all Zipped files in this folder) both ProductCatalog and PLUSales
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks again,
My SSIS package creates exactly same as you mentioned above but my task it to get those files into one place. so from there again SSIS package runs and load all the records into fact table.
I will wait for you, can you please let me know the wildcard version for folders instead of files.
Sorry to being pain, but this is bit critical to load. Please help me out.
My SSIS package creates exactly same as you mentioned above but my task it to get those files into one place. so from there again SSIS package runs and load all the records into fact table.
I will wait for you, can you please let me know the wildcard version for folders instead of files.
Sorry to being pain, but this is bit critical to load. Please help me out.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
But to be honest with you, I got 350 subfolders and all the subfolders got PLUSales.csv files. I need to get them into BUNDABERG.zip along with ProductCatalog.csv. - This is for only BUNDABERG site and I got 190 sites all this
You mean to say I need to write 350 times for each subfolder.
Any Idea we can dynamically change that control it. This is really driving me crazy.
You mean to say I need to write 350 times for each subfolder.
Any Idea we can dynamically change that control it. This is really driving me crazy.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much for your time. However, above script didn't help. It will move the whole folder instead of file. I have to sit whole night now, extract each file and place it in a folder and load into fact table.
Sorry mate !!
Thanks for your help, some tiems it doesn't go our way !! :(
Sorry mate !!
Thanks for your help, some tiems it doesn't go our way !! :(
ASKER
User is very helpful. We both tried ,probably someone can you the code.
But I appreciate his input.
But I appreciate his input.
When I tested it, (the -ir! switch) I only pulled in the files that were *.csv and not the folder.
If you are moving all of them anyway, you may as well use the script to zip them up and save yourself some time. Dump them in a folder and change the origin to that folder.
You're right, sometimes this 'stuff' doesn't go our way, but it irritates me to death to not find a solution. Especially if it costs someone else a bunch of time. I sit in front of a keyboard many hours in a day by choice (at work and at home), but I try to free up someone else that wants to get away.
If you are moving all of them anyway, you may as well use the script to zip them up and save yourself some time. Dump them in a folder and change the origin to that folder.
You're right, sometimes this 'stuff' doesn't go our way, but it irritates me to death to not find a solution. Especially if it costs someone else a bunch of time. I sit in front of a keyboard many hours in a day by choice (at work and at home), but I try to free up someone else that wants to get away.
According to 7-zip command & switches you must enter "-r0" switch to include "Enable recurse subdirectories only for wildcard names".
Try it and please let me know is it ok or not on my mail address.