What is the path of file for export csv of products - magento

I wanna just know the path of the file where i can customize the code for export csv of products as per my need.

Create export.csv on root ..write a code to export csv the new thing is that you have to hardcode base url in the path of the product..
for example ..existing path category/product/
base url/category/product/
But remember to keep the code correct..

Related

Specify a relative path as infile for a .ctl

I can't seem to find a way to specify a relative path for my infile when using sql loader.
I'm running it through a command line and this is what it looks like:
C:\app\...in\sqlldr.exe userid=user/pass
control="C:\User...DATA_DATA_TABLE.ctl" log="C:\User...DATA_DATA_TABLE.log"
bad = "C:\User...DATA_DATA_TABLE.bad" discard = "C:\User...DATA_DATA_TABLE.dsc"
(I've added carriage returns just for the readability on here, the command i use is one line)
And this works, it's will start inserting stuff in the table IF the path to my infile in .ctl is absolute like "C:\Usertemp\example.ldr"
My ctl was generated autmatically by sqldeveloper. And i just changed the path to this:
OPTIONS (ERRORS=50)
LOAD DATA
INFILE 'AI_SLA_DATA_DATA_TABLE.ldr' "str '{EOL}'" <-- i'm trying to get relative path here but doesn't work
APPEND
CONTINUEIF NEXT(1:1) = '#'
INTO TABLE "USER"."DATA"
...other sqldeveloper generated stuff
The .ldr file is in the same directory as the .ctl file. Is it possible to get the path of the ctl? I'm pretty sure he searches for the .ldr file next to the sqlldr.exe instead of the ctl.
Any tips to do this? I can't find answers on docs.oracle.
Thanks.
I've never tried adding a relative path to the .ctl file, but for me it works fine as a command-line argument, e.g.
C:\app\...in\sqlldr.exe userid=user/pass
control="DATA_DATA_TABLE.ctl" log="DATA_DATA_TABLE.log"
bad = "DATA_DATA_TABLE.bad" discard ="DATA_DATA_TABLE.dsc"
data="AI_SLA_DATA_DATA_TABLE.ldr"

import csv file on Neo4J with a Mac: which path to use for my file?

I am a new user of Neo4J. I would like to import a simple csv file into neo4J with my Mac, but it seems I am doing something wrong with the path to my file. I have tried many different ways but it is not working. the only workaround I found is to upload it on dropbox....
please see below the code I am using/
LOAD CSV WITH HEADERS FROM "file://Users/Cam/Documents/Neo4j/default.graphdb/import/node_attributes.csv" as line
RETURN count(*)
the error message is:
Cannot load from URL
'file://Users/Cam/Documents/Neo4j/default.graphdb/import/node_attributes.csv':
file URL may not contain an authority section (i.e. it should be
'file:///')
I already try to add some /// in the path but it is not working.
If the CSV file is in your default.graphdb/import folder, then you don't need to provide the absolute path, just give the path relative to the import folder:
LOAD CSV WITH HEADERS FROM "file:///node_attributes.csv" as line
RETURN count(*)
I'd use neo4j-import from the terminal:
Example from https://neo4j.com/developer/guide-import-csv/
neo4j-import --into retail.db --id-type string \
--nodes:Customer customers.csv --nodes products.csv \
--nodes orders_header.csv,orders1.csv,orders2.csv \
--relationships:CONTAINS order_details.csv \
--relationships:ORDERED customer_orders_header.csv,orders1.csv,orders2.csv
What is not working when you try
LOAD CSV WITH HEADERS FROM "file:///Users/Cam/Documents/Neo4j/default.graphdb/import/node_attributes.csv" as line RETURN count(*)
?

How to set path to file in Laravel?

I have located file in root directory of Laravel.
From controller I try to get this file like as:
$shipments = json_decode(file_get_contents("Statistics.json"), true);
But I get error.
What correct path to specify for getting file?
https://laravel.com/docs/5.0/helpers#paths
I guess you need base_path
file_get_contents(base_path().'/Statistics.json');

Magmi import error

trying out the Magmi importer. Saved a file under the /var/import directory, which is found by Magmi and displayed in the dropdown of the file to import section, but when I run the import process I get the error message "NO FILE".
Check the file permission using for the file using linux console command chmod or cPanel
[magmi_root]/magmi/conf/Magmi_CSVDataSource.conf
If the file is not writable, Magmi cannot save the settings. Change the appropriate file permissions save the Magmi profile again, you are done!
Make sure you hit Save Profile after selecting the CSV file in the dropdown.
As a final check, open the magmi/conf/Magmi_CSVDataSource.conf file and see if the filename variable is set to the correct CSV location:
[Magmi_CSVDataSource]
CSV:importmode = "local"
CSV:basedir = "var/import"
CSV:filename = "/absolute/server/path/to/your/import.csv"
CSV:remoteurl =
CSV:remoteuser =
CSV:remotepass =
CSV:separator = ","
CSV:enclosure = ":DQUOTE:"
CSV:headerline =
Did you check if "Filesystem Path to magento directory" is correct? The default value is: "../.." This is correct when Magmi is installed in: [magento_root]/magmi/web/magmi.php I think you can also enter the absolute path to you Magento directory.

how to make a generic path for a log file in Ruby

Here I am creating the logs folder under the current path of the directory using Dir::pwd. But I want to change this to pick the directory path from config files which will run in any other machines.
date_directory= "#{Dir::pwd}/logs/#{DateHelper.getDirectoryYearStamp}/#{DateHelper.getDirectoryMonthStamp}/#{DateHelper.getDirectoryDateStamp}/"
FileUtils.mkdir_p(date_directory) unless Dir.exists?(date_directory)
I tired with giving the absolute path and it works. But how do I make the directory by passing the relative path?
You are allready using a relative path, so is is generic solution, the subfolder of your current folder is a relative position. Is the code you published working ? But inside your question you mention config files, is it that what you want ? What kind of file ? a yaml, ini or of a simple text file ?
If a simple textfile you can do with
path = File.read("#{File.dirname(__FILE__)}/path.txt")
EDIT: based on your comment, the following snippets wil create a logfile a day in the /some/x/y/z
folder.
require 'logger'
$log = Logger.new("/some/x/y/z/logs.txt", 'daily' )
$log.info "teststring"
gives in the file "C:\some\x\y\z\logs.txt"
# Logfile created on 2013-04-05 13:17:27 +0200 by logger.rb/31641
I, [2013-04-05T13:20:19.811837 #3300] INFO -- : teststring

Resources